Files
TachiyomiSY/app/src/main/java/exh/util/Math.kt
T
2021-02-24 16:16:47 -05:00

12 lines
232 B
Kotlin

package exh.util
import kotlin.math.floor
fun Float.floor(): Int = floor(this).toInt()
fun Double.floor(): Int = floor(this).toInt()
fun Int.nullIfZero() = takeUnless { it == 0 }
fun Long.nullIfZero() = takeUnless { it == 0L }