Package com.illumon.iris.libs.primitives
Class DoubleFpPrimitives
java.lang.Object
com.illumon.iris.libs.primitives.DoubleFpPrimitives
public class DoubleFpPrimitives extends Object
A set of commonly used doubleing point numeric functions that can be applied to Double types.
-
Constructor Summary
Constructors Constructor Description DoubleFpPrimitives()
-
Method Summary
Modifier and Type Method Description static boolean
containsNonNormal(double[] values)
Returnstrue
if the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.static boolean
containsNonNormal(Double... values)
Returnstrue
if the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.static boolean
isInf(double value)
Returnstrue
if the value is infinite andfalse
otherwise.static boolean
isNaN(double value)
Returnstrue
if the value is NaN andfalse
otherwise.static boolean
isNormal(double value)
Returnstrue
if the value is normal, where "normal" is defined as not infinite, not NaN, and not null.
-
Constructor Details
-
DoubleFpPrimitives
public DoubleFpPrimitives()
-
-
Method Details
-
isNaN
public static boolean isNaN(double value)Returnstrue
if the value is NaN andfalse
otherwise.- Parameters:
value
- value.- Returns:
true
if the value is NaN andfalse
otherwise.
-
isInf
public static boolean isInf(double value)Returnstrue
if the value is infinite andfalse
otherwise.- Parameters:
value
- value.- Returns:
true
if the value is infinite andfalse
otherwise.
-
isNormal
public static boolean isNormal(double value)Returnstrue
if the value is normal, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
value
- value.- Returns:
true
if the value is not infinite, NaN, nor null;false
otherwise
-
containsNonNormal
Returnstrue
if the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
values
- values.- Returns:
true
if any value is notnormal
;false
otherwise.- See Also:
isNormal(double)
-
containsNonNormal
public static boolean containsNonNormal(double[] values)Returnstrue
if the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
values
- values.- Returns:
true
if any value is notnormal
;false
otherwise.- See Also:
isNormal(double)
-