scoop:scoop.math:0.1.0
clamp
public
public fun clamp(value: Short, min: Short, max: Short): Short
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
min: Short
public
max: Short
public
value: Short
public
public fun clamp(value: UInt, min: UInt, max: UInt): UInt
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
max: UInt
public
min: UInt
public
value: UInt
public
public fun clamp(value: Float, min: Float, max: Float): Float
Clamps to inclusive numeric bounds; NaN or reversed bounds throw.
public
max: Float
public
value: Float
public
min: Float
public
public fun clamp(value: Int, min: Int, max: Int): Int
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
value: Int
public
max: Int
public
min: Int
public
public fun clamp(value: UShort, min: UShort, max: UShort): UShort
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
max: UShort
public
value: UShort
public
min: UShort
public
public fun clamp(value: Byte, min: Byte, max: Byte): Byte
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
min: Byte
public
value: Byte
public
max: Byte
public
public fun clamp(value: UByte, min: UByte, max: UByte): UByte
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
value: UByte
public
min: UByte
public
max: UByte
public
public fun clamp(value: Long, min: Long, max: Long): Long
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
value: Long
public
min: Long
public
max: Long
public
public fun clamp(value: ULong, min: ULong, max: ULong): ULong
Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.
public
max: ULong
public
min: ULong
public
value: ULong
public
public fun clamp(value: Double, min: Double, max: Double): Double
Clamps to inclusive numeric bounds; NaN or reversed bounds throw.
public
value: Double
public
max: Double
public
min: Double