mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-22 16:34:05 +09:00
code for new itemsheet format
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user