RichUtils / pyxis.uzuki.live.richutilskt.utils / kotlin.Int / makeLimit

makeLimit

@JvmOverloads fun Int.makeLimit(min: Int = 0, max: Int = 0): Int

Adjust the given number so that it does not go out of range with given min, max

Parameters

min - Int

max - Int

Receiver
Int

Return
Int