Minor: split math sources into regions
This commit is contained in:
@@ -10,7 +10,7 @@ import kotlin.internal.InlineOnly
|
||||
import kotlin.js.Math as nativeMath
|
||||
|
||||
|
||||
// ================ Double Math ========================================
|
||||
// region ================ Double Math ========================================
|
||||
|
||||
/** Computes the sine of the angle [x] given in radians.
|
||||
*
|
||||
@@ -543,10 +543,11 @@ public actual fun Double.roundToLong(): Long = when {
|
||||
else -> nativeMath.round(this).unsafeCast<Double>().toLong()
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
|
||||
|
||||
// ================ Float Math ========================================
|
||||
// region ================ Float Math ========================================
|
||||
|
||||
/** Computes the sine of the angle [x] given in radians.
|
||||
*
|
||||
@@ -1010,6 +1011,9 @@ public actual inline fun Float.roundToInt(): Int = toDouble().roundToInt()
|
||||
public actual inline fun Float.roundToLong(): Long = toDouble().roundToLong()
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
// region ================ Integer Math ========================================
|
||||
|
||||
|
||||
/**
|
||||
@@ -1116,3 +1120,4 @@ public actual val Long.sign: Int get() = when {
|
||||
}
|
||||
|
||||
|
||||
// endregion
|
||||
|
||||
Reference in New Issue
Block a user