Java Utililty Methods Cube

List of utility methods to do Cube

  1. HOME
  2. Java
  3. C
  4. Cube

Description

The list of methods to do Cube are organized into topic(s).

Method

double cube(double d)
cube
return d * d * d;
double cube(double value)
Returns the cube of a value.
return value * value * value;
int cube(int a)
cube
return a * a * a;
int cube(int value)
cube
return value * value * value;
byte[][] cube2rect(byte[][][] cube)
cuberect
int zSize = cube.length;
byte[][] rect = new byte[zSize][cube[0].length * cube[0][0].length];
for (int z = 0; z < zSize; z++) {
 rect[z] = square2array(cube[z]);
return rect;
double cubed(final int input)
Cubes the specified number.
return Math.pow(input, 3);
boolean cubeIntersectsSphere(int x1, int y1, int z1, int x2, int y2, int z2, int sX, int sY, int sZ, int radius)
Checks if the cube intersects the sphere.
double d = radius * radius;
if (sX < x1) {
 d -= Math.pow(sX - x1, 2);
} else if (sX > x2) {
 d -= Math.pow(sX - x2, 2);
if (sY < y1) {
 d -= Math.pow(sY - y1, 2);
...
float[] cubeTextureArray(float x0, float y0, float x1, float y1)
A GL_QUAD compatible array of texture coordinates.
float[] tex = new float[] { x0, y0, x1, y0, x1, y1, x0, y1 };
return makeBigArray(tex, 6);
float[] cubeTextureFace(float x0, float y0, float x1, float y1)
cube Texture Face
return new float[] { x0, y0, x1, y0, x1, y1, x0, y1 };
float[] cubeToBounds(float[] target, float x, float y, float z, float w, float d, float h)
Converts a cuboid like bounding box to an actual bounding box.
assert target.length == 6;
target[0] = x;
target[1] = y;
target[2] = z;
target[3] = x + w;
target[4] = y + d;
target[5] = z + h;
return target;
...


AltStyle によって変換されたページ (->オリジナル) /