I have the following code snippet:
if (ABS(p43.x) < EPS && ABS(p43.y) < EPS && ABS(p43.z) < EPS) return(FALSE);
Which I'm trying to convert to C#. What does "EPS" mean?
This code is from http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/
Machine Epsilon is a machine-dependent floating point value that provides an upper bound on relative error due to rounding in floating point arithmetic. Mathematically, for each floating point type, it is equivalent to the difference between 1.0 and the smallest representable value that is greater than 1.0.
Accuracy in Double Precision In base 2 , eps is equal to 2^-52 . Return the distance from 10.0 to the next larger double-precision number.
It's going to be some form of epsilon to determine whether the number is "small enough to be insignificant". The exact value looks like it's being #define
d somewhere in this case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With