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)
    Returns true 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)
    Returns true 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)
    Returns true if the value is infinite and false otherwise.
    static boolean isNaN​(float value)
    Returns true if the value is NaN and false otherwise.
    static boolean isNormal​(float value)
    Returns true if the value is normal, where "normal" is defined as not infinite, not NaN, and not null.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • isNaN

      public static boolean isNaN​(float value)
      Returns true if the value is NaN and false otherwise.
      Parameters:
      value - value.
      Returns:
      true if the value is NaN and false otherwise.
    • isInf

      public static boolean isInf​(float value)
      Returns true if the value is infinite and false otherwise.
      Parameters:
      value - value.
      Returns:
      true if the value is infinite and false otherwise.
    • isNormal

      public static boolean isNormal​(float value)
      Returns true 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

      public static boolean containsNonNormal​(Float... values)
      Returns true 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 not normal; false otherwise.
      See Also:
      isNormal(float)
    • containsNonNormal

      public static boolean containsNonNormal​(float[] values)
      Returns true 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 not normal; false otherwise.
      See Also:
      isNormal(float)