liminal
11/28/2018, 3:39 AMhudsonb
11/28/2018, 3:48 AMfun main(args: Array<String>) {
val a = 3f
val b = 3.14f
println(a % 1 == 0f)
println(b % 1 == 0f)
}
Would print the following:
true
false
if(foo % 1 != 0f)
inline fun Float.isWhole() = this % 1 == 0f
inline fun Float.isNotWhole() = !isWhole()
or w/e you'd want to call themliminal
11/28/2018, 4:04 AMnfrankel
11/28/2018, 7:15 AM