List of utility methods to do floor
int | floorInt(float x) http://www.java-gaming.org/index.php?topic=24194.0 return (int) (x + BIG_ENOUGH_FLOOR) - BIG_ENOUGH_INT; |
int | floorLogBaseTwo(final int i) Returns the log base 2 of an integer, rounded to the floor. checkPositiveInteger(i);
return 31 - Integer.numberOfLeadingZeros(i);
|
long | floorLong(final double x) Returns (long) Math.floor(x) .
return (long) Math.floor(x); |
float | floormod(float a, float b) floormod float r = a % b; if (r < 0) r += b; return (r); |
long | floorMod(long x, long y) floor Mod return x - floorDiv(x, y) * y;
|
long | floorMod(long x, long y) Returns the floor modulus of the long arguments. return x - floorDiv(x, y) * y;
|
int | floorModExt(int dividend, int divisor) Computes floored remainder or return divident for zero division. if (divisor == 0) return dividend; return dividend - divisor * floorDiv(dividend, divisor); |
int | floorModulo(int value, int divisor) Calculates the remainder based on #floorDivide(int,int) . {@code floorModulo(1, 2) == 1}</li> * <li>{@code floorModulo(0, 2) == 0}</li> * <li>{@code floorModulo(-1, 2) == 1}</li> * <li>{@code floorModulo(-2, 2) == 0}</li> * <li>{@code floorModulo(-3, 2) == 1}</li> * </ul> * * @param value numerator * @param divisor divisor ... |
byte[][] | floorPlaneAndHorizToPlanView(final int[][] frameCells, final short frame[], final int h) floor Plane And Horiz To Plan View final int w = (int) (Math.sin((camFOVx / 2) * Math.PI / 180) * h) * 2; final int cwidth = frameCells.length; final int cheight = frameCells[0].length; final double angle = (double) camFOVx / 2 * Math.PI / 180; byte[][] result = new byte[w][h]; final int xdctr = cwidth / 2; for (int y = 0; y < cheight; y++) { for (int x = 0; x < cwidth; x++) { ... |
byte[][] | floorPlaneToPlanView(int[][] frameCells, final int h) Project floorplane from depth view into plan view final int w = (int) (Math.sin((camFOVx / 2) * Math.PI / 180) * h) * 2; final int cwidth = frameCells.length; final int cheight = frameCells[0].length; final double angle = (double) camFOVx / 2 * Math.PI / 180; byte[][] result = new byte[w][h]; final int xdctr = cwidth / 2; for (int y = 0; y < cheight; y++) { for (int x = 0; x < cwidth; x++) { ... |