trait Math extends scala.scalajs.js.Object with StObject
- Annotations
- @JSType() @native()
- Source
- Math.scala
- Alphabetic
- By Inheritance
- Math
- StObject
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): scala.Boolean
- Definition Classes
- AnyRef → Any
- val E: Double
The mathematical constant e.
The mathematical constant e. This is Euler's number, the base of natural logarithms.
- val LN10: Double
The natural logarithm of 10.
- val LN2: Double
The natural logarithm of 2.
- val LOG10E: Double
The base-10 logarithm of e.
- val LOG2E: Double
The base-2 logarithm of e.
- val PI: Double
Pi.
Pi. This is the ratio of the circumference of a circle to its diameter.
- val SQRT1_2: Double
The square root of 0.5, or, equivalently, one divided by the square root of 2.
- val SQRT2: Double
The square root of 2.
- def abs(x: Double): Double
Returns the absolute value of a number (the value without regard to whether it is positive or negative).
Returns the absolute value of a number (the value without regard to whether it is positive or negative). For example, the absolute value of -5 is the same as the absolute value of 5.
- x
A numeric expression for which the absolute value is needed.
- def acos(x: Double): Double
Returns the arc cosine (or inverse cosine) of a number.
Returns the arc cosine (or inverse cosine) of a number.
- x
A numeric expression.
- def acosh(x: Double): Double
Returns the inverse hyperbolic cosine of a number.
Returns the inverse hyperbolic cosine of a number.
- x
A numeric expression that contains an angle measured in radians.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asin(x: Double): Double
Returns the arcsine of a number.
Returns the arcsine of a number.
- x
A numeric expression.
- def asinh(x: Double): Double
Returns the inverse hyperbolic sine of a number.
Returns the inverse hyperbolic sine of a number.
- x
A numeric expression that contains an angle measured in radians.
- def atan(x: Double): Double
Returns the arctangent of a number.
Returns the arctangent of a number.
- x
A numeric expression for which the arctangent is needed.
- def atan2(y: Double, x: Double): Double
Returns the angle (in radians) from the X axis to a point.
Returns the angle (in radians) from the X axis to a point.
- y
A numeric expression representing the cartesian y-coordinate.
- x
A numeric expression representing the cartesian x-coordinate.
- def atanh(x: Double): Double
Returns the inverse hyperbolic tangent of a number.
Returns the inverse hyperbolic tangent of a number.
- x
A numeric expression that contains an angle measured in radians.
- def cbrt(x: Double): Double
Returns an implementation-dependent approximation to the cube root of number.
Returns an implementation-dependent approximation to the cube root of number.
- x
A numeric expression.
- def ceil(x: Double): Double
Returns the smallest integer greater than or equal to its numeric argument.
Returns the smallest integer greater than or equal to its numeric argument.
- x
A numeric expression.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def clz32(x: Double): Double
Returns the number of leading zero bits in the 32-bit binary representation of a number.
Returns the number of leading zero bits in the 32-bit binary representation of a number.
- x
A numeric expression.
- def cos(x: Double): Double
Returns the cosine of a number.
Returns the cosine of a number.
- x
A numeric expression that contains an angle measured in radians.
- def cosh(x: Double): Double
Returns the hyperbolic cosine of a number.
Returns the hyperbolic cosine of a number.
- x
A numeric expression that contains an angle measured in radians.
- final def eq(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef → Any
- def exp(x: Double): Double
Returns e (the base of natural logarithms) raised to a power.
Returns e (the base of natural logarithms) raised to a power.
- x
A numeric expression representing the power of e.
- def expm1(x: Double): Double
Returns the result of (e^x - 1), which is an implementation-dependent approximation to subtracting 1 from the exponential function of x (e raised to the power of x, where e is the base of the natural logarithms).
Returns the result of (e^x - 1), which is an implementation-dependent approximation to subtracting 1 from the exponential function of x (e raised to the power of x, where e is the base of the natural logarithms).
- x
A numeric expression.
- def floor(x: Double): Double
Returns the greatest integer less than or equal to its numeric argument.
Returns the greatest integer less than or equal to its numeric argument.
- x
A numeric expression.
- def fround(x: Double): Double
Returns the nearest single precision float representation of a number.
Returns the nearest single precision float representation of a number.
- x
A numeric expression.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasOwnProperty(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hypot(values: Double*): Double
Returns the square root of the sum of squares of its arguments.
Returns the square root of the sum of squares of its arguments.
- values
Values to compute the square root for. If no arguments are passed, the result is +0. If there is only one argument, the result is the absolute value. If any argument is +Infinity or -Infinity, the result is +Infinity. If any argument is NaN, the result is NaN. If all arguments are either +0 or −0, the result is +0.
- def imul(x: Double, y: Double): Double
Returns the result of 32-bit multiplication of two numbers.
Returns the result of 32-bit multiplication of two numbers.
- x
First number
- y
Second number
- final def isInstanceOf[T0]: scala.Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: scala.scalajs.js.Object): scala.Boolean
- Definition Classes
- Object
- def log(x: Double): Double
Returns the natural logarithm (base e) of a number.
Returns the natural logarithm (base e) of a number.
- x
A numeric expression.
- def log10(x: Double): Double
Returns the base 10 logarithm of a number.
Returns the base 10 logarithm of a number.
- x
A numeric expression.
- def log1p(x: Double): Double
Returns the natural logarithm of 1 + x.
Returns the natural logarithm of 1 + x.
- x
A numeric expression.
- def log2(x: Double): Double
Returns the base 2 logarithm of a number.
Returns the base 2 logarithm of a number.
- x
A numeric expression.
- def max(values: Double*): Double
Returns the larger of a set of supplied numeric expressions.
Returns the larger of a set of supplied numeric expressions.
- values
Numeric expressions to be evaluated.
- def min(values: Double*): Double
Returns the smaller of a set of supplied numeric expressions.
Returns the smaller of a set of supplied numeric expressions.
- values
Numeric expressions to be evaluated.
- final def ne(arg0: AnyRef): scala.Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def pow(x: Double, y: Double): Double
Returns the value of a base expression taken to a specified power.
Returns the value of a base expression taken to a specified power.
- x
The base value of the expression.
- y
The exponent value of the expression.
- def propertyIsEnumerable(v: scala.Predef.String): scala.Boolean
- Definition Classes
- Object
- def random(): Double
Returns a pseudorandom number between 0 and 1.
- def round(x: Double): Double
Returns a supplied numeric expression rounded to the nearest integer.
Returns a supplied numeric expression rounded to the nearest integer.
- x
The value to be rounded to the nearest integer.
- def sign(x: Double): Double
Returns the sign of the x, indicating whether x is positive, negative or zero.
Returns the sign of the x, indicating whether x is positive, negative or zero.
- x
The numeric expression to test
- def sin(x: Double): Double
Returns the sine of a number.
Returns the sine of a number.
- x
A numeric expression that contains an angle measured in radians.
- def sinh(x: Double): Double
Returns the hyperbolic sine of a number.
Returns the hyperbolic sine of a number.
- x
A numeric expression that contains an angle measured in radians.
- def sqrt(x: Double): Double
Returns the square root of a number.
Returns the square root of a number.
- x
A numeric expression.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tan(x: Double): Double
Returns the tangent of a number.
Returns the tangent of a number.
- x
A numeric expression that contains an angle measured in radians.
- def tanh(x: Double): Double
Returns the hyperbolic tangent of a number.
Returns the hyperbolic tangent of a number.
- x
A numeric expression that contains an angle measured in radians.
- def toLocaleString(): scala.Predef.String
- Definition Classes
- Object
- def toString(): java.lang.String
- Definition Classes
- AnyRef → Any
- val toStringTag: java.lang.String
- Annotations
- @JSName(js.Symbol.toStringTag)
- def trunc(x: Double): Double
Returns the integral part of the a numeric expression, x, removing any fractional digits.
Returns the integral part of the a numeric expression, x, removing any fractional digits. If x is already an integer, the result is x.
- x
A numeric expression.
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated