Packages

object MathUtil

Various utility functions for mathematical and numerical operations.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MathUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def average(x1: Double, x2: Double): Double

    Computes the average of two numbers.

    Computes the average of two numbers.

    x1

    a number

    x2

    a number return the average of the inputs

  6. def clamp(x: Int, min: Int, max: Int): Int

    Clamps an int value to a given range.

    Clamps an int value to a given range.

    x

    the value to clamp

    min

    the minimum value of the range

    max

    the maximum value of the range return the clamped value

  7. def clamp(x: Double, min: Double, max: Double): Double

    Clamps a double value to a given range.

    Clamps a double value to a given range.

    x

    the value to clamp

    min

    the minimum value of the range

    max

    the maximum value of the range return the clamped value

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def log10(x: Double): Double

    Computes the base-10 logarithm of a double value.

    Computes the base-10 logarithm of a double value.

    • If the argument is NaN or less than zero, then the result is NaN.
    • If the argument is positive infinity, then the result is positive infinity.
    • If the argument is positive zero or negative zero, then the result is negative infinity.
    x

    a positive number return the value log a, the base-10 logarithm of the input value

  16. def max(v1: Double, v2: Double, v3: Double, v4: Double): Double
  17. def max(v1: Double, v2: Double, v3: Double): Double
  18. def min(v1: Double, v2: Double, v3: Double, v4: Double): Double
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. def wrap(index: Int, max: Int): Int

    Computes an index which wraps around a given maximum value.

    Computes an index which wraps around a given maximum value. For values >= 0, this is equals to val % max. For values < 0, this is equal to max - (-val) % max

    index

    the value to wrap

    max

    the maximum value (or modulus) return the wrapped index

Inherited from AnyRef

Inherited from Any

Ungrouped