wire: off-to-on traversal of nonbranching wire connection

This commit is contained in:
minjaesong
2021-08-11 16:45:39 +09:00
parent bfdfa17e3e
commit 7bb921321f
3 changed files with 100 additions and 44 deletions

View File

@@ -531,6 +531,8 @@ fun Int.abs() = this.absoluteValue
fun Double.bipolarClamp(limit: Double) =
this.coerceIn(-limit, limit)
fun Boolean.toInt() = if (this) 1 else 0
fun Int.bitCount() = java.lang.Integer.bitCount(this)
fun Long.bitCount() = java.lang.Long.bitCount(this)
fun absMax(left: Double, right: Double): Double {