Package com.illumon.iris.libs.primitives
Class FloatFpPrimitives
java.lang.Object
com.illumon.iris.libs.primitives.FloatFpPrimitives
public class FloatFpPrimitives extends Object
A set of commonly used floating point numeric functions that can be applied to Float types.
-
Constructor Summary
Constructors Constructor Description FloatFpPrimitives()
-
Method Summary
Modifier and Type Method Description static boolean
containsNonNormal(float[] 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(Float... 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(float value)
Returnstrue
if the value is infinite andfalse
otherwise.static boolean
isNaN(float value)
Returnstrue
if the value is NaN andfalse
otherwise.static boolean
isNormal(float value)
Returnstrue
if 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)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(float 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(float 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(float)
-
containsNonNormal
public static boolean containsNonNormal(float[] 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(float)
-