Math
Platform and version requirements: JS (1.1)
object MathDeprecated: Use top-level functions from kotlin.math package instead.
Exposes the JavaScript Math object to Kotlin.
Properties
Platform and version requirements: JS (1.1)
PI
val PI: Double
Functions
Platform and version requirements: JS (1.1)
abs
fun abs(value: Double): Double
Platform and version requirements: JS (1.1)
acos
fun acos(value: Double): Double
Platform and version requirements: JS (1.1)
asin
fun asin(value: Double): Double
Platform and version requirements: JS (1.1)
atan
fun atan(value: Double): Double
Platform and version requirements: JS (1.1)
atan2
fun atan2(y: Double, x: Double): Double
Platform and version requirements: JS (1.1)
ceil
fun ceil(value: Number): Int
Platform and version requirements: JS (1.1)
cos
fun cos(value: Double): Double
Platform and version requirements: JS (1.1)
exp
fun exp(value: Double): Double
Platform and version requirements: JS (1.1)
floor
fun floor(value: Number): Int
Platform and version requirements: JS (1.1)
log
fun log(value: Double): Double
Platform and version requirements: JS (1.1)
max
fun max(vararg values: Int): Int
fun max(vararg values: Float): Float
fun max(vararg values: Double): Double
Platform and version requirements: JS (1.1)
min
fun min(vararg values: Int): Int
fun min(vararg values: Float): Float
fun min(vararg values: Double): Double
Platform and version requirements: JS (1.1)
pow
fun pow(base: Double, exp: Double): Double
Platform and version requirements: JS (1.1)
random
fun random(): Double
Platform and version requirements: JS (1.1)
round
fun round(value: Number): Int
Platform and version requirements: JS (1.1)
sin
fun sin(value: Double): Double
Platform and version requirements: JS (1.1)
sqrt
fun sqrt(value: Double): Double
Platform and version requirements: JS (1.1)
tan
fun tan(value: Double): Double
Extension Functions
Platform and version requirements: JS (1.1)
max
Returns the greater of two values.
fun Math.max(a: Long, b: Long): Long
Platform and version requirements: JS (1.1)
min
Returns the smaller of two values.
fun Math.min(a: Long, b: Long): Long
© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-math/index.html