Class Mathf

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Mathf
    extends java.lang.Object
    implements java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Mathf()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double InvSqrt​(double fValue)
      Calculation of 1/sqrt(fValue)
      static float InvSqrt​(float fValue)
      Calculation of 1/sqrt(fValue)
      static float Log2​(float fValue)  
      static float SymmetricRandom()
      Generate a random number in [-1,1).
      static float UnitRandom()  
      • Methods inherited from class java.lang.Object

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

      • Mathf

        public Mathf()
    • Method Detail

      • InvSqrt

        public static float InvSqrt​(float fValue)
        Calculation of 1/sqrt(fValue)
        Parameters:
        fValue - value to calculate 1/sqrt(fValue)
        Returns:
        1/sqrt(fValue)
      • InvSqrt

        public static double InvSqrt​(double fValue)
        Calculation of 1/sqrt(fValue)
        Parameters:
        fValue - value to calculate 1/sqrt(fValue)
        Returns:
        1/sqrt(fValue)
      • Log2

        public static float Log2​(float fValue)
      • SymmetricRandom

        public static float SymmetricRandom()
        Generate a random number in [-1,1). The random number generator may be seeded by a first call to SymmetricRandom with a positive seed.
        Returns:
        a random number in [-1,1)
      • UnitRandom

        public static float UnitRandom()