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