|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Basic Float math utility functions. More...
Static Public Member Functions | |
| static float[] | makeIdentity (final float[] m) |
| Make matrix an identity matrix. More... | |
| static float[] | makeTranslation (final float[] m, final boolean initM, final float tx, final float ty, final float tz) |
| Make a translation matrix in column-major order from the given axis deltas. More... | |
| static float[] | makeScale (final float[] m, final boolean initM, final float sx, final float sy, final float sz) |
| Make a scale matrix in column-major order from the given axis factors. More... | |
| static float[] | makeFrustum (final float[] m, final int m_offset, final boolean initM, final float left, final float right, final float bottom, final float top, final float zNear, final float zFar) throws GLException |
| Make given matrix the frustum matrix based on given parameters. More... | |
| static float[] | makePerspective (final float[] m, final int m_off, final boolean initM, final float fovy_rad, final float aspect, final float zNear, final float zFar) throws GLException |
Make given matrix the perspective frustum matrix based on given parameters. More... | |
| static float[] | makeLookAt (final float[] m, final int m_offset, final float[] eye, final int eye_offset, final float[] center, final int center_offset, final float[] up, final int up_offset, final float[] mat4Tmp) |
| Make given matrix the look-at matrix based on given parameters. More... | |
| static float[] | makePick (final float[] m, final float x, final float y, final float deltaX, final float deltaY, final int[] viewport, final int viewport_offset, final float[] mat4Tmp) |
| Make given matrix the pick matrix based on given parameters. More... | |
| static float[] | transposeMatrix (final float[] msrc, final float[] mres) |
| Transpose the given matrix. More... | |
| static float | matrixDeterminant (final float[] m) |
| Returns the determinant of the given matrix. More... | |
| static float[] | invertMatrix (final float[] msrc, final float[] mres) |
| Invert the given matrix. More... | |
| static boolean | mapObjToWin (final float objx, final float objy, final float objz, final float[] modelMatrix, final int modelMatrix_offset, final float[] projMatrix, final int projMatrix_offset, final int[] viewport, final int viewport_offset, final float[] win_pos, final int win_pos_offset, final float[] vec4Tmp1, final float[] vec4Tmp2) |
| Map object coordinates to window coordinates. More... | |
| static boolean | mapWinToObj (final float winx, final float winy, final float winz, final float[] modelMatrix, final int modelMatrix_offset, final float[] projMatrix, final int projMatrix_offset, final int[] viewport, final int viewport_offset, final float[] obj_pos, final int obj_pos_offset, final float[] mat4Tmp1, final float[] mat4Tmp2) |
| Map window coordinates to object coordinates. More... | |
| static boolean | mapWinToObj4 (final float winx, final float winy, final float winz, final float clipw, final float[] modelMatrix, final int modelMatrix_offset, final float[] projMatrix, final int projMatrix_offset, final int[] viewport, final int viewport_offset, final float near, final float far, final float[] obj_pos, final int obj_pos_offset, final float[] mat4Tmp1, final float[] mat4Tmp2) |
| Map window coordinates to object coordinates. More... | |
| static void | multMatrix (final float[] a, final int a_off, final float[] b, final int b_off, final float[] d, final int d_off) |
| Multiply matrix: [d] = [a] x [b]. More... | |
| static float[] | multMatrix (final float[] a, final float[] b, final float[] d) |
| Multiply matrix: [d] = [a] x [b]. More... | |
| static void | multMatrix (final float[] a, final int a_off, final float[] b, final int b_off) |
| Multiply matrix: [a] = [a] x [b]. More... | |
| static float[] | multMatrix (final float[] a, final float[] b) |
| Multiply matrix: [a] = [a] x [b]. More... | |
| static void | multMatrix (final FloatBuffer a, final FloatBuffer b, final float[] d) |
| Multiply matrix: [d] = [a] x [b]. More... | |
| static void | multMatrix (final FloatBuffer a, final FloatBuffer b) |
| Multiply matrix: [a] = [a] x [b]. More... | |
| static void | multMatrixVec (final float[] m_in, final int m_in_off, final float[] v_in, final int v_in_off, final float[] v_out, final int v_out_off) |
| static void | multMatrixVec (final float[] m_in, final int m_in_off, final float[] v_in, final float[] v_out) |
| static float[] | multMatrixVec (final float[] m_in, final float[] v_in, final float[] v_out) |
| static void | multMatrixVec (final FloatBuffer m_in, final float[] v_in, final float[] v_out) |
| static float[] | multMatrixVec3 (final float[] m_in, final float[] v_in, final float[] v_out) |
| Affine 3f-vector transformation by 4x4 matrix. More... | |
| static StringBuilder | matrixRowToString (StringBuilder sb, final String f, final FloatBuffer a, final int aOffset, final int rows, final int columns, final boolean rowMajorOrder, final int row) |
| static StringBuilder | matrixRowToString (StringBuilder sb, final String f, final float[] a, final int aOffset, final int rows, final int columns, final boolean rowMajorOrder, final int row) |
| static StringBuilder | matrixToString (StringBuilder sb, final String rowPrefix, final String f, final FloatBuffer a, final int aOffset, final int rows, final int columns, final boolean rowMajorOrder) |
| static StringBuilder | matrixToString (StringBuilder sb, final String rowPrefix, final String f, final float[] a, final int aOffset, final int rows, final int columns, final boolean rowMajorOrder) |
| static float | getMachineEpsilon () |
| Return computed machine Epsilon value. More... | |
| static float | adegToRad (final float arc_degree) |
| Converts arc-degree to radians. More... | |
| static float | radToADeg (final float rad) |
| Converts radians to arc-degree. More... | |
| static boolean | isEqualRaw (final float a, final float b) |
Returns true if both values are equal disregarding EPSILON but considering NaN, -Inf and +Inf. More... | |
| static boolean | isEqual (final float a, final float b, final float epsilon) |
| Returns true if both values are equal, i.e. More... | |
| static boolean | isEqual (final float a, final float b) |
| Returns true if both values are equal, i.e. More... | |
| static boolean | isEqual2 (final float a, final float b) |
| Returns true if both values are equal, i.e. More... | |
| static int | compare (final float a, final float b) |
Returns -1, 0 or 1 if a is less, equal or greater than b, disregarding epsilon but considering NaN, -Inf and +Inf. More... | |
| static int | compare (final float a, final float b, final float epsilon) |
Returns -1, 0 or 1 if a is less, equal or greater than b, considering epsilon and NaN, -Inf and +Inf. More... | |
| static boolean | isZero (final float a, final float epsilon) |
| Returns true if value is zero, i.e. More... | |
| static boolean | isZero (final float a) |
| Returns true if value is zero, i.e. More... | |
| static boolean | isZeroRaw (final float a) |
Returns true if value is zero, disregarding EPSILON but considering NaN, -Inf and +Inf. More... | |
| static float | abs (final float a) |
Invokes Math#abs(float). More... | |
| static float | pow (final float a, final float b) |
| static float | sin (final float a) |
| static float | asin (final float a) |
| static float | cos (final float a) |
| static float | acos (final float a) |
| static float | tan (final float a) |
| static float | atan (final float a) |
| static float | atan2 (final float y, final float x) |
| static float | sqrt (final float a) |
| static float | getZBufferEpsilon (final int zBits, final float z, final float zNear) |
| Returns resolution of Z buffer of given parameter, see Love Your Z-Buffer. More... | |
| static int | getZBufferValue (final int zBits, final float z, final float zNear, final float zFar) |
| Returns Z buffer value of given parameter, see Love Your Z-Buffer. More... | |
| static float | getOrthoWinZ (final float orthoZ, final float zNear, final float zFar) |
| Returns orthogonal distance (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);. More... | |
Static Public Attributes | |
| static final boolean | DEBUG = Debug.debugExplicit("Math") |
| static final float | E = 2.7182818284590452354f |
| static final float | PI = 3.14159265358979323846f |
| The value PI, i.e. More... | |
| static final float | TWO_PI = 2f * PI |
| The value 2PI, i.e. More... | |
| static final float | HALF_PI = PI / 2f |
| The value PI/2, i.e. More... | |
| static final float | QUARTER_PI = PI / 4f |
| The value PI/4, i.e. More... | |
| static final float | SQUARED_PI = PI * PI |
| The value PI^2. More... | |
| static final float | EPSILON = 1.1920929E-7f |
Epsilon for floating point {@value}, as once computed via getMachineEpsilon() on an AMD-64 CPU. More... | |
| static final float | INV_DEVIANCE = 1.0E-5f |
| Inversion Epsilon, used with equals method to determine if two inverted matrices are close enough to be considered equal. More... | |
| static final int | IEC559_SIGN_BIT = 1 << 31 |
| Signed bit 31 of IEEE 754 (IEC 559) single float-point bit layout, i.e. More... | |
Basic Float math utility functions.
Implementation assumes linear matrix layout in column-major order matching OpenGL's implementation, illustration:
Row-Major Column-Major (OpenGL):
| 0 1 2 tx |
| |
| 4 5 6 ty |
M = | |
| 8 9 10 tz |
| |
| 12 13 14 15 |
R C R C
m[0*4+3] = tx; m[0+4*3] = tx;
m[1*4+3] = ty; m[1+4*3] = ty;
m[2*4+3] = tz; m[2+4*3] = tz;
RC (std subscript order) RC (std subscript order)
m03 = tx; m03 = tx;
m13 = ty; m13 = ty;
m23 = tz; m23 = tz;
Implementation utilizes unrolling of small vertices and matrices wherever possible while trying to access memory in a linear fashion for performance reasons, see:
Definition at line 83 of file FloatUtil.java.
|
static |
Invokes Math#abs(float).
| a | float to process |
a Math#abs(float) directly Definition at line 1597 of file FloatUtil.java.
|
static |
|
static |
Converts arc-degree to radians.
Definition at line 1368 of file FloatUtil.java.
|
static |
|
static |
|
static |
|
static |
Returns -1, 0 or 1 if a is less, equal or greater than b, disregarding epsilon but considering NaN, -Inf and +Inf.
Implementation considers following corner cases:
Definition at line 1508 of file FloatUtil.java.
|
static |
Returns -1, 0 or 1 if a is less, equal or greater than b, considering epsilon and NaN, -Inf and +Inf.
epsilon must be > 0.
Implementation considers following corner cases:
Definition at line 1544 of file FloatUtil.java.
|
static |
|
static |
Return computed machine Epsilon value.
The machine Epsilon value is computed once.
On a reference machine the result was EPSILON in 23 iterations.
Definition at line 1338 of file FloatUtil.java.
|
static |
Returns orthogonal distance (1f/zNear-1f/orthoZ) / (1f/zNear-1f/zFar);.
Definition at line 1661 of file FloatUtil.java.
|
static |
Returns resolution of Z buffer of given parameter, see Love Your Z-Buffer.
return z * z / ( zNear * (1<<zBits) - z )
Examples:
1.5256461E-4 = 16 zBits, -0.2 zDist, 0.1 zNear 6.1033297E-6 = 16 zBits, -1.0 zDist, 0.1 zNear
| zBits | number of bits of Z precision, i.e. z-buffer depth |
| z | distance from the eye to the object |
| zNear | distance from eye to near clip plane |
Definition at line 1633 of file FloatUtil.java.
|
static |
Returns Z buffer value of given parameter, see Love Your Z-Buffer.
float a = zFar / ( zFar - zNear ) float b = zFar * zNear / ( zNear - zFar ) return (int) ( (1<<zBits) * ( a + b / z ) )
| zBits | number of bits of Z precision, i.e. z-buffer depth |
| z | distance from the eye to the object |
| zNear | distance from eye to near clip plane |
| zFar | distance from eye to far clip plane |
Definition at line 1651 of file FloatUtil.java.
|
static |
Invert the given matrix.
Returns null if inversion is not possible, e.g. matrix is singular due to a bad matrix.
| msrc | 4x4 matrix in column-major order, the source |
| mres | 4x4 matrix in column-major order, the result - may be msrc (in-place) |
null. See above. Definition at line 512 of file FloatUtil.java.
|
static |
Returns true if both values are equal, i.e.
their absolute delta < EPSILON, considering EPSILON and NaN, -Inf and +Inf.
Implementation considers following corner cases:
Definition at line 1472 of file FloatUtil.java.
|
static |
Returns true if both values are equal, i.e.
their absolute delta < epsilon, considering epsilon and NaN, -Inf and +Inf.
epsilon must be > 0.
Implementation considers following corner cases:
Definition at line 1450 of file FloatUtil.java.
|
static |
Returns true if both values are equal, i.e.
their absolute delta < EPSILON, considering EPSILON but disregarding NaN, -Inf and +Inf.
Implementation does not consider corner cases like isEqual(float, float, float).
Definition at line 1489 of file FloatUtil.java.
|
static |
Returns true if both values are equal disregarding EPSILON but considering NaN, -Inf and +Inf.
Implementation considers following corner cases:
Definition at line 1429 of file FloatUtil.java.
|
static |
Returns true if value is zero, i.e.
it's absolute value < EPSILON.
Definition at line 1569 of file FloatUtil.java.
|
static |
Returns true if value is zero, i.e.
it's absolute value < epsilon.
epsilon must be > 0.
| a | value to test |
| epsilon | optional positive epsilon value, must be > 0 |
Definition at line 1561 of file FloatUtil.java.
|
static |
Returns true if value is zero, disregarding EPSILON but considering NaN, -Inf and +Inf.
Implementation considers following corner cases:
Definition at line 1585 of file FloatUtil.java.
|
static |
Make given matrix the frustum matrix based on given parameters.
Frustum matrix (Column Order): 2*zNear/dx 0 0 0 0 2*zNear/dy 0 0 A B C -1 0 0 D 0
<p<blockquote>
All matrix fields are only set if initM is true.
| m | 4x4 matrix in column-major order (also result) |
| m_offset | offset in given array m, i.e. start of the 4x4 matrix |
| initM | if true, given matrix will be initialized w/ identity matrix, otherwise only the frustum fields are set. |
| left | |
| right | |
| bottom | |
| top | |
| zNear | |
| zFar |
| GLException | if zNear <= 0 or zFar <= zNear or left == right, or bottom == top. |
Definition at line 218 of file FloatUtil.java.
|
static |
Make matrix an identity matrix.
| m | 4x4 matrix in column-major order (also result) |
Definition at line 96 of file FloatUtil.java.
|
static |
Make given matrix the look-at matrix based on given parameters.
Consist out of two matrix multiplications:
R = L x T,
with L for look-at matrix and
T for eye translation.
Result R can be utilized for modelview multiplication, i.e.
M = M x R,
with M being the modelview matrix.
All matrix fields are set.
| m | 4x4 matrix in column-major order, result only |
| m_offset | offset in given array m, i.e. start of the 4x4 matrix |
| eye | 3 component eye vector |
| eye_offset | |
| center | 3 component center vector |
| center_offset | |
| up | 3 component up vector |
| up_offset | |
| mat4Tmp | temp float[16] storage |
m for chaining Definition at line 329 of file FloatUtil.java.
|
static |
Make given matrix the perspective frustum matrix based on given parameters.
All matrix fields are only set if initM is true.
| m | 4x4 matrix in column-major order (also result) |
| m_offset | offset in given array m, i.e. start of the 4x4 matrix |
| initM | if true, given matrix will be initialized w/ identity matrix, otherwise only the frustum fields are set. |
| fovy_rad | angle in radians |
| aspect | aspect ratio width / height |
| zNear | |
| zFar |
| GLException | if zNear <= 0 or zFar <= zNear |
Definition at line 292 of file FloatUtil.java.
|
static |
Make given matrix the pick matrix based on given parameters.
Traditional gluPickMatrix implementation.
Consist out of two matrix multiplications:
R = T x S,
with T for viewport translation matrix and
S for viewport scale matrix.
Result R can be utilized for projection multiplication, i.e.
P = P x R,
with P being the projection matrix.
To effectively use the generated pick matrix for picking, call makePick and multiply a custom perspective matrix by this pick matrix. Then you may load the result onto the perspective matrix stack.
All matrix fields are set.
| m | 4x4 matrix in column-major order, result only |
| m_offset | offset in given array m, i.e. start of the 4x4 matrix |
| x | the center x-component of a picking region in window coordinates |
| y | the center y-component of a picking region in window coordinates |
| deltaX | the width of the picking region in window coordinates. |
| deltaY | the height of the picking region in window coordinates. |
| viewport | 4 component viewport vector |
| viewport_offset | |
| mat4Tmp | temp float[16] storage |
m for chaining or null if either delta value is <= zero. Definition at line 415 of file FloatUtil.java.
|
static |
Make a scale matrix in column-major order from the given axis factors.
Scale matrix (Any Order): x 0 0 0 0 y 0 0 0 0 z 0 0 0 0 1
<p<blockquote>
All matrix fields are only set if initM is true.
| m | 4x4 matrix in column-major order (also result) |
| initM | if true, given matrix will be initialized w/ identity matrix, otherwise only the diagonal and last-row is set. The latter can be utilized to share a once identity set matrix for scaling and translation, while leaving the other fields untouched for performance reasons. |
Definition at line 176 of file FloatUtil.java.
|
static |
Make a translation matrix in column-major order from the given axis deltas.
Translation matrix (Column Order): 1 0 0 0 0 1 0 0 0 0 1 0 x y z 1
<p<blockquote>
All matrix fields are only set if initM is true.
| m | 4x4 matrix in column-major order (also result) |
| initM | if true, given matrix will be initialized w/ identity matrix, otherwise only the diagonal and last-row is set. The latter can be utilized to share a once identity set matrix for scaling and translation, while leaving the other fields untouched for performance reasons. |
Definition at line 140 of file FloatUtil.java.
|
static |
Map object coordinates to window coordinates.
Traditional gluProject implementation.
| objx | |
| objy | |
| objz | |
| modelMatrix | 4x4 modelview matrix |
| modelMatrix_offset | |
| projMatrix | 4x4 projection matrix |
| projMatrix_offset | |
| viewport | 4 component viewport vector |
| viewport_offset | |
| win_pos | 3 component window coordinate, the result |
| win_pos_offset | |
| vec4Tmp1 | 4 component vector for temp storage |
| vec4Tmp2 | 4 component vector for temp storage |
Definition at line 607 of file FloatUtil.java.
|
static |
Map window coordinates to object coordinates.
Traditional gluUnProject implementation.
| winx | |
| winy | |
| winz | |
| modelMatrix | 4x4 modelview matrix |
| modelMatrix_offset | |
| projMatrix | 4x4 projection matrix |
| projMatrix_offset | |
| viewport | 4 component viewport vector |
| viewport_offset | |
| obj_pos | 3 component object coordinate, the result |
| obj_pos_offset | |
| mat4Tmp1 | 16 component matrix for temp storage |
| mat4Tmp2 | 16 component matrix for temp storage |
Definition at line 665 of file FloatUtil.java.
|
static |
Map window coordinates to object coordinates.
Traditional gluUnProject4 implementation.
| winx | |
| winy | |
| winz | |
| clipw | |
| modelMatrix | 4x4 modelview matrix |
| modelMatrix_offset | |
| projMatrix | 4x4 projection matrix |
| projMatrix_offset | |
| viewport | 4 component viewport vector |
| viewport_offset | |
| near | |
| far | |
| obj_pos | 4 component object coordinate, the result |
| obj_pos_offset | |
| mat4Tmp1 | 16 component matrix for temp storage |
| mat4Tmp2 | 16 component matrix for temp storage |
Definition at line 733 of file FloatUtil.java.
|
static |
Returns the determinant of the given matrix.
| m | 4x4 matrix in column-major order, the source |
Definition at line 474 of file FloatUtil.java.
|
static |
| sb | optional passed StringBuilder instance to be used |
| f | the format string of one floating point, i.e. "%10.5f", see java.util.Formatter |
| a | mxn matrix (rows x columns) |
| aOffset | offset to a's current position |
| rows | |
| columns | |
| rowMajorOrder | if true floats are layed out in row-major-order, otherwise column-major-order (OpenGL) |
| row | row number to print |
Definition at line 1227 of file FloatUtil.java.
|
static |
| sb | optional passed StringBuilder instance to be used |
| f | the format string of one floating point, i.e. "%10.5f", see java.util.Formatter |
| a | mxn matrix (rows x columns) |
| aOffset | offset to a's current position |
| rows | |
| columns | |
| rowMajorOrder | if true floats are layed out in row-major-order, otherwise column-major-order (OpenGL) |
| row | row number to print |
Definition at line 1197 of file FloatUtil.java.
|
static |
| sb | optional passed StringBuilder instance to be used |
| rowPrefix | optional prefix for each row |
| f | the format string of one floating point, i.e. "%10.5f", see java.util.Formatter |
| a | mxn matrix (rows x columns) |
| aOffset | offset to a's current position |
| rows | |
| columns | |
| rowMajorOrder | if true floats are laid out in row-major-order, otherwise column-major-order (OpenGL) |
Definition at line 1284 of file FloatUtil.java.
|
static |
| sb | optional passed StringBuilder instance to be used |
| rowPrefix | optional prefix for each row |
| f | the format string of one floating point, i.e. "%10.5f", see java.util.Formatter |
| a | mxn matrix (rows x columns) |
| aOffset | offset to a's current position |
| rows | |
| columns | |
| rowMajorOrder | if true floats are layed out in row-major-order, otherwise column-major-order (OpenGL) |
Definition at line 1255 of file FloatUtil.java.
|
static |
Multiply matrix: [a] = [a] x [b].
| a | 4x4 matrix in column-major order (also result) |
| b | 4x4 matrix in column-major order |
Definition at line 970 of file FloatUtil.java.
|
static |
Multiply matrix: [d] = [a] x [b].
| a | 4x4 matrix in column-major order |
| b | 4x4 matrix in column-major order |
| d | result a*b in column-major order |
Definition at line 847 of file FloatUtil.java.
|
static |
Multiply matrix: [a] = [a] x [b].
| a | 4x4 matrix in column-major order (also result) |
| b | 4x4 matrix in column-major order |
Definition at line 909 of file FloatUtil.java.
|
static |
Multiply matrix: [d] = [a] x [b].
| a | 4x4 matrix in column-major order |
| b | 4x4 matrix in column-major order |
| d | result a*b in column-major order |
Definition at line 785 of file FloatUtil.java.
|
static |
Multiply matrix: [a] = [a] x [b].
| a | 4x4 matrix in column-major order (also result) |
| b | 4x4 matrix in column-major order |
Definition at line 1052 of file FloatUtil.java.
|
static |
Multiply matrix: [d] = [a] x [b].
| a | 4x4 matrix in column-major order |
| b | 4x4 matrix in column-major order |
| d | result a*b in column-major order |
Definition at line 1033 of file FloatUtil.java.
|
static |
| m_in | 4x4 matrix in column-major order |
| m_in_off | |
| v_in | 4-component column-vector |
| v_out | m_in * v_in |
Definition at line 1124 of file FloatUtil.java.
|
static |
| m_in | 4x4 matrix in column-major order |
| m_in_off | |
| v_in | 4-component column-vector |
| v_out | m_in * v_in |
Definition at line 1098 of file FloatUtil.java.
|
static |
| m_in | 4x4 matrix in column-major order |
| m_in_off | |
| v_in | 4-component column-vector |
| v_out | m_in * v_in |
Definition at line 1072 of file FloatUtil.java.
|
static |
| m_in | 4x4 matrix in column-major order |
| v_in | 4-component column-vector |
| v_out | m_in * v_in |
Definition at line 1146 of file FloatUtil.java.
|
static |
Affine 3f-vector transformation by 4x4 matrix.
4x4 matrix multiplication with 3-component vector, using 1 for for v_in[3] and dropping v_out[3], which shall be 1.
| m_in | 4x4 matrix in column-major order |
| m_in_off | |
| v_in | 3-component column-vector |
| v_out | m_in * v_in, 3-component column-vector |
Definition at line 1172 of file FloatUtil.java.
|
static |
Definition at line 1599 of file FloatUtil.java.
|
static |
Converts radians to arc-degree.
Definition at line 1373 of file FloatUtil.java.
|
static |
|
static |
|
static |
|
static |
Transpose the given matrix.
| msrc | 4x4 matrix in column-major order, the source |
| mres | 4x4 matrix in column-major order, the result |
Definition at line 442 of file FloatUtil.java.
|
static |
Definition at line 84 of file FloatUtil.java.
|
static |
Definition at line 1350 of file FloatUtil.java.
|
static |
Epsilon for floating point {@value}, as once computed via getMachineEpsilon() on an AMD-64 CPU.
Definition of machine epsilon guarantees that:
1.0f + EPSILON != 1.0f
In other words: machEps is the maximum relative error of the chosen rounding procedure.
A number can be considered zero if it is in the range (or in the set):
MaybeZeroSet e ]-machEps .. machEps[ (exclusive)
While comparing floating point values, machEps allows to clip the relative error:
boolean isZero = afloat < EPSILON; boolean isNotZero = afloat >= EPSILON; boolean isEqual = abs(bfloat - afloat) < EPSILON; boolean isNotEqual = abs(bfloat - afloat) >= EPSILON;
Definition at line 1403 of file FloatUtil.java.
|
static |
|
static |
Signed bit 31 of IEEE 754 (IEC 559) single float-point bit layout, i.e.
0x80000000.
Definition at line 1414 of file FloatUtil.java.
|
static |
Inversion Epsilon, used with equals method to determine if two inverted matrices are close enough to be considered equal.
Using {@value}, which is ~100 times FloatUtil#EPSILON.
Definition at line 1411 of file FloatUtil.java.
|
static |
|
static |
The value PI^2.
Definition at line 1365 of file FloatUtil.java.
|
static |