scala

object Math

[source: scala/Math.scala]

@deprecated("use scala.math package instead")

object Math
extends AnyRef
The object Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
Value Summary
val E : Double
The double value that is closer than any other to e, the base of the natural logarithms.
val EPS_DOUBLE : Double
The smallest difference between two values of scala.Double.
val EPS_FLOAT : Float
The smallest difference between two values of scala.Float.
val MAX_BYTE : Byte
val MAX_CHAR : Char
val MAX_DOUBLE : Double
The greatest possible value for scala.Double.
val MAX_FLOAT : Float
The greatest possible value for scala.Float.
val MAX_INT : Int
val MAX_LONG : Long
val MAX_SHORT : Short
val MIN_BYTE : Byte
val MIN_CHAR : Char
val MIN_DOUBLE : Double
The smallest possible value for scala.Double.
val MIN_FLOAT : Float
The smallest possible value for scala.Float.
val MIN_INT : Int
val MIN_LONG : Long
val MIN_SHORT : Short
val NEG_INF_DOUBLE : Double
Negative infinity of type scala.Double.
val NEG_INF_FLOAT : Float
Negative infinity of type scala.Float.
val NaN_DOUBLE : Double
A value of type scala.Double that represents no number.
val NaN_FLOAT : Float
A value of type scala.Float that represents no number.
val POS_INF_DOUBLE : Double
Positive infinity of type scala.Double.
val POS_INF_FLOAT : Float
Positive infinity of type scala.Float.
val Pi : Double
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Method Summary
def IEEEremainder (x : Double, y : Double) : Double
def abs (x : Float) : Float
def abs (x : Double) : Double
def abs (x : Long) : Long
def abs (x : Int) : Int
def acos (x : Double) : Double
def asin (x : Double) : Double
def atan (x : Double) : Double
def atan2 (y : Double, x : Double) : Double
Converts rectangular coordinates (x, y) to polar (r, theta).
def ceil (x : Double) : Double
def cos (x : Double) : Double
def exp (x : Double) : Double
Returns Euler's number e raised to the power of a double value.
def floor (x : Double) : Double
def log (x : Double) : Double
def max (x : Double, y : Double) : Double
def max (x : Long, y : Long) : Long
def max (x : Int, y : Int) : Int
def max (x : Float, y : Float) : Float
def min (x : Int, y : Int) : Int
def min (x : Float, y : Float) : Float
def min (x : Long, y : Long) : Long
def min (x : Double, y : Double) : Double
def pow (x : Double, y : Double) : Double
Returns the value of the first argument raised to the power of the second argument.
def random : Double
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.
def rint (x : Double) : Double
Returns the double value that is closest in value to the argument and is equal to a mathematical integer.
def round (x : Float) : Int
Returns the closest long to the argument.
def round (x : Double) : Long
def signum (x : Int) : Int
def signum (x : Double) : Double
def signum (x : Long) : Long
def signum (x : Float) : Float
def sin (x : Double) : Double
def sqrt (x : Double) : Double
def tan (x : Double) : Double
def toDegrees (x : Double) : Double
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
def toRadians (x : Double) : Double
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
@deprecated("Use scala.Byte.MinValue instead")

val MIN_BYTE : Byte

@deprecated("Use scala.Byte.MaxValue instead")

val MAX_BYTE : Byte

@deprecated("Use scala.Short.MinValue instead")

val MIN_SHORT : Short

@deprecated("Use scala.Short.MaxValue instead")

val MAX_SHORT : Short

@deprecated("Use scala.Char.MinValue instead")

val MIN_CHAR : Char

@deprecated("Use scala.Char.MaxValue instead")

val MAX_CHAR : Char

@deprecated("Use scala.Int.MinValue instead")

val MIN_INT : Int

@deprecated("Use scala.Int.MaxValue instead")

val MAX_INT : Int

@deprecated("Use scala.Long.MinValue instead")

val MIN_LONG : Long

@deprecated("Use scala.Long.MaxValue instead")

val MAX_LONG : Long

@deprecated("Use scala.Float.MinValue instead")

val MIN_FLOAT : Float
The smallest possible value for scala.Float.

@deprecated("Use scala.Float.Epsilon instead")

val EPS_FLOAT : Float
The smallest difference between two values of scala.Float.

@deprecated("Use scala.Float.MaxValue instead")

val MAX_FLOAT : Float
The greatest possible value for scala.Float.

@deprecated("Use scala.Float.NaN instead")

val NaN_FLOAT : Float
A value of type scala.Float that represents no number.

@deprecated("Use scala.Float.NegativeInfinity instead")

val NEG_INF_FLOAT : Float
Negative infinity of type scala.Float.

@deprecated("Use scala.Float.PositiveInfinity instead")

val POS_INF_FLOAT : Float
Positive infinity of type scala.Float.

@deprecated("Use scala.Double.MinValue instead")

val MIN_DOUBLE : Double
The smallest possible value for scala.Double.

@deprecated("Use scala.Double.Epsilon instead")

val EPS_DOUBLE : Double
The smallest difference between two values of scala.Double.

@deprecated("Use scala.Double.MaxValue instead")

val MAX_DOUBLE : Double
The greatest possible value for scala.Double.

@deprecated("Use scala.Double.NaN instead")

val NaN_DOUBLE : Double
A value of type scala.Double that represents no number.

@deprecated("Use scala.Double.NegativeInfinity instead")

val NEG_INF_DOUBLE : Double
Negative infinity of type scala.Double.

@deprecated("Use scala.Double.PositiveInfinity instead")

val POS_INF_DOUBLE : Double
Positive infinity of type scala.Double.

val E : Double
The double value that is closer than any other to e, the base of the natural logarithms.

val Pi : Double
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.

Method Details
def random : Double
Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.

def sin(x : Double) : Double

def cos(x : Double) : Double

def tan(x : Double) : Double

def asin(x : Double) : Double

def acos(x : Double) : Double

def atan(x : Double) : Double

def toRadians(x : Double) : Double
Converts an angle measured in degrees to an approximately equivalent angle measured in radians.
Parameters
x - an angle, in degrees
Returns
the measurement of the angle x in radians.

def toDegrees(x : Double) : Double
Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
Parameters
x - angle, in radians
Returns
the measurement of the angle x in degrees.

def exp(x : Double) : Double
Returns Euler's number e raised to the power of a double value.
Parameters
x - the exponent to raise e to.
Returns
the value ea, where e is the base of the natural logarithms.

def log(x : Double) : Double

def sqrt(x : Double) : Double

def IEEEremainder(x : Double, y : Double) : Double

def ceil(x : Double) : Double

def floor(x : Double) : Double

def rint(x : Double) : Double
Returns the double value that is closest in value to the argument and is equal to a mathematical integer.
Parameters
x - a double value
Returns
the closest floating-point value to a that is equal to a mathematical integer.

def atan2(y : Double, x : Double) : Double
Converts rectangular coordinates (x, y) to polar (r, theta).
Parameters
x - the ordinate coordinate
y - the abscissa coordinate
Returns
the theta component of the point (r, theta) in polar coordinates that corresponds to the point (x, y) in Cartesian coordinates.

def pow(x : Double, y : Double) : Double
Returns the value of the first argument raised to the power of the second argument.
Parameters
x - the base.
y - the exponent.
Returns
the value xy.

def round(x : Float) : Int
Returns the closest long to the argument.
Parameters
x - a floating-point value to be rounded to a long.
Returns
the value of the argument rounded to the nearest long value.

def round(x : Double) : Long

def abs(x : Int) : Int

def abs(x : Long) : Long

def abs(x : Float) : Float

def abs(x : Double) : Double

def max(x : Int, y : Int) : Int

def max(x : Long, y : Long) : Long

def max(x : Float, y : Float) : Float

def max(x : Double, y : Double) : Double

def min(x : Int, y : Int) : Int

def min(x : Long, y : Long) : Long

def min(x : Float, y : Float) : Float

def min(x : Double, y : Double) : Double

def signum(x : Double) : Double

def signum(x : Float) : Float

def signum(x : Long) : Long

def signum(x : Int) : Int