forked from upstream-mirrors/quik
Restrict swatch to bounds of SL picker
This commit is contained in:
@@ -34,4 +34,8 @@ fun Int.forEach(action: (Int) -> Unit) {
|
||||
for (index in 0 until this) {
|
||||
action(index)
|
||||
}
|
||||
}
|
||||
|
||||
fun Float.within(min: Float, max: Float): Float {
|
||||
return Math.min(max, Math.max(min, this))
|
||||
}
|
||||
Reference in New Issue
Block a user