Class FunctionsMisc

  • public final class FunctionsMisc
    extends java.lang.Object
    This class contains a small set of useful functions that don't really fit in the other categories.
    • Field Summary

      Modifier and Type Field Description
      static Function EQUAL
      Equality function.
      static double EQUALITY_THRESHOLD
      This is the threshold used to consider values equal, that is, if two values a and b are separated by less than this threshold they will be considered to be equal, it has a default value of 1.0E-12
      static Function GCD
      Returns the Greatest Common Denominator of two numbers.
      static Function IF
      Branching function.
      static Function INFINITY
      Retrieves the value of Double.POSITIVE_INFINITY.
      static Function IS_NAN
      Tells if a number is Double.NaN.
      static Function LCM
      Returns the Least Common Multiple of two numbers.
      static Function MAX
      Returns the largest (closest to positive infinity) of two numbers.
      static Function MIN
      Returns the smallest (closest to negative infinity) of two numbers.
      static Function ROUND
      Rounds to closest integer.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Function getFunction​(java.lang.String name)
      Get the function for a given name.
      static Function[] getFunctions()
      Array with all the available functions.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait