2020-09-12 05:12:13 +02:00
|
|
|
package exh.util
|
|
|
|
|
|
2020-10-28 00:52:32 +01:00
|
|
|
import kotlin.math.floor
|
2020-09-12 05:12:13 +02:00
|
|
|
|
2020-10-28 00:52:32 +01:00
|
|
|
fun Float.floor(): Int = floor(this).toInt()
|
|
|
|
|
|
|
|
|
|
fun Double.floor(): Int = floor(this).toInt()
|
|
|
|
|
|
|
|
|
|
fun Int.nullIfZero() = if (this == 0) null else this
|
|
|
|
|
|
|
|
|
|
fun Long.nullIfZero() = if (this == 0L) null else this
|