StrictMath

object StrictMath

Functions

Link copied to clipboard
fun abs(a: Double): Double

Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:

fun abs(a: Float): Float

Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:

Link copied to clipboard
fun asin(a: Double): Double

Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2. Special cases:

Link copied to clipboard
fun cos(a: Double): Double

Returns the trigonometric cosine of an angle. Special cases:

Link copied to clipboard
fun log(a: Double): Double

Returns the natural logarithm (base e) of a double value. Special cases:

Link copied to clipboard
fun max(a: Double, b: Double): Double

Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.

fun max(a: Int, b: Int): Int
Link copied to clipboard
fun min(a: Double, b: Double): Double

Returns the smaller of two double values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.

fun min(a: Float, b: Float): Float
fun min(a: Int, b: Int): Int
Link copied to clipboard
fun sin(a: Double): Double

Returns the trigonometric sine of an angle. Special cases:

Link copied to clipboard
fun sqrt(a: Double): Double

Returns the correctly rounded positive square root of a double value. Special cases:

Link copied to clipboard
fun toRadians(angdeg: Double): Double

Converts an angle measured in degrees to an approximately equivalent angle measured in radians. The conversion from degrees to radians is generally inexact.