1 2 3 4 5 6 7 8
package cc.polyfrost.oneconfig.utils.dsl import cc.polyfrost.oneconfig.utils.MathUtils /** * @see MathUtils.clamp */ fun Number.clamp(min: Number = 0F, max: Number = 1F) = MathUtils.clamp(this.toFloat(), min.toFloat(), max.toFloat())