Sha256: ca2484b62fa94dda6c1ae72df02c667afa841a8408bdb011b5b0e8c471499b8f
Contents?: true
Size: 565 Bytes
Versions: 6
Compression:
Stored size: 565 Bytes
Contents
package org.sunflow.core.bucket; import org.sunflow.core.BucketOrder; public class ColumnBucketOrder implements BucketOrder { @Override public int[] getBucketSequence(int nbw, int nbh) { int[] coords = new int[2 * nbw * nbh]; for (int i = 0; i < nbw * nbh; i++) { int bx = i / nbh; int by = i % nbh; if ((bx & 1) == 1) { by = nbh - 1 - by; } coords[2 * i + 0] = bx; coords[2 * i + 1] = by; } return coords; } }
Version data entries
6 entries across 6 versions & 1 rubygems