Package com.illumon.iris.libs.primitives
Class DoubleFpPrimitives
java.lang.Object
com.illumon.iris.libs.primitives.DoubleFpPrimitives
A set of commonly used doubleing point numeric functions that can be applied to Double types.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsNonNormal(double[] values) Returnstrueif the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.static booleancontainsNonNormal(Double... values) Returnstrueif the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.static booleanisInf(double value) Returnstrueif the value is infinite andfalseotherwise.static booleanisNaN(double value) Returnstrueif the value is NaN andfalseotherwise.static booleanisNormal(double value) Returnstrueif 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) Returnstrueif the value is NaN andfalseotherwise.- Parameters:
value- value.- Returns:
trueif the value is NaN andfalseotherwise.
-
isInf
public static boolean isInf(double value) Returnstrueif the value is infinite andfalseotherwise.- Parameters:
value- value.- Returns:
trueif the value is infinite andfalseotherwise.
-
isNormal
public static boolean isNormal(double value) Returnstrueif the value is normal, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
value- value.- Returns:
trueif the value is not infinite, NaN, nor null;falseotherwise
-
containsNonNormal
Returnstrueif the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
values- values.- Returns:
trueif any value is notnormal;falseotherwise.- See Also:
-
containsNonNormal
public static boolean containsNonNormal(double[] values) Returnstrueif the values contains any non-normal value, where "normal" is defined as not infinite, not NaN, and not null.- Parameters:
values- values.- Returns:
trueif any value is notnormal;falseotherwise.- See Also:
-