Sha256: 3d328259806a6bfda7b8c8fd74ec1f0681048d9ace52e074fc666abcd2930266
Contents?: true
Size: 562 Bytes
Versions: 6
Compression:
Stored size: 562 Bytes
Contents
package org.sunflow.core.bucket; import org.sunflow.core.BucketOrder; public class RowBucketOrder 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 by = i / nbw; int bx = i % nbw; if ((by & 1) == 1) { bx = nbw - 1 - bx; } coords[2 * i + 0] = bx; coords[2 * i + 1] = by; } return coords; } }
Version data entries
6 entries across 6 versions & 1 rubygems