lone leaves decaying

This commit is contained in:
minjaesong
2024-01-28 20:14:48 +09:00
parent 6e69fb3872
commit d3cd3465c7
6 changed files with 52 additions and 15 deletions

View File

@@ -1038,4 +1038,7 @@ fun <S, T> List<S>.cartesianProduct(other: List<T>) = this.flatMap { thisIt ->
other.map { otherIt ->
thisIt to otherIt
}
}
}
fun Float.ditherToInt() = (this + Math.random() - 0.5).roundToInt()
fun Double.ditherToInt() = (this + Math.random() - 0.5).roundToInt()