Package com.esri.core.geometry
Class MathUtils
java.lang.Object
com.esri.core.geometry.MathUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
The implementation of the Kahan summation algorithm. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static double
copySign
(double x, double y) Returns one value with the sign of another (like copysign).(package private) static double
FMod
(double x, double y) C fmod function.(package private) static double
lerp
(double start_, double end_, double t) Computes interpolation between two values, using the interpolation factor t.(package private) static void
(package private) static void
Computes interpolation between two values, using the interpolation factor t.(package private) static double
round
(double v) Rounds double to the closest integer value.(package private) static int
sign
(double value) Calculates sign of the given value.(package private) static double
sqr
(double v) (package private) static double
truncate
(double v) Rounds towards zero.
-
Constructor Details
-
MathUtils
MathUtils()
-
-
Method Details
-
copySign
static double copySign(double x, double y) Returns one value with the sign of another (like copysign). -
sign
static int sign(double value) Calculates sign of the given value. Returns 0 if the value is equal to 0. -
truncate
static double truncate(double v) Rounds towards zero. -
FMod
static double FMod(double x, double y) C fmod function. -
round
static double round(double v) Rounds double to the closest integer value. -
sqr
static double sqr(double v) -
lerp
static double lerp(double start_, double end_, double t) Computes interpolation between two values, using the interpolation factor t. The interpolation formula is (end - start) * t + start. However, the computation ensures that t = 0 produces exactly start, and t = 1, produces exactly end. It also guarantees that for 0 invalid input: '<'= t invalid input: '<'= 1, the interpolated value v is between start and end. -
lerp
Computes interpolation between two values, using the interpolation factor t. The interpolation formula is (end - start) * t + start. However, the computation ensures that t = 0 produces exactly start, and t = 1, produces exactly end. It also guarantees that for 0 invalid input: '<'= t invalid input: '<'= 1, the interpolated value v is between start and end. -
lerp
static void lerp(double start_x, double start_y, double end_x, double end_y, double t, Point2D result)
-