code for new itemsheet format

This commit is contained in:
minjaesong
2023-06-06 14:37:54 +09:00
parent ac53f821e2
commit eb2c716691
8 changed files with 65 additions and 21 deletions

View File

@@ -627,7 +627,7 @@ fun Double.sqrt() = Math.sqrt(this)
fun Float.sqrt() = FastMath.sqrt(this)
fun Int.abs() = this.absoluteValue
fun Double.bipolarClamp(limit: Double) = this.coerceIn(-limit, limit)
fun Boolean.toInt() = if (this) 1 else 0
fun Boolean.toInt(shift: Int = 0) = if (this) 1.shl(shift) else 0
fun Int.bitCount() = java.lang.Integer.bitCount(this)
fun Long.bitCount() = java.lang.Long.bitCount(this)