blob: 5678a48e3ccc946681da22ee7e008c1da641bad8 (
plain)
1
2
3
4
5
6
7
8
9
|
fun Double.toRadians() = this * kotlin.math.PI / 180
fun Double.sine() = kotlin.math.sin(this.toRadians())
fun Double.cosine() = kotlin.math.cos(this.toRadians())
fun Double.toFlooredInt() = kotlin.math.floor(this).toInt()
fun Double.toRoundedString() = this.asDynamic().toFixed(2) as String
|