coerceWithin

inline fun Float.coerceWithin(a: Float, b: Float): Float

coerceIn which doesn't require a to be less than b.

Ensures that this value lies in the specified range a..b.

Return

this value if it's in the range, or the smaller of a or b if this value is less than it, or the higher bound if this value is greater than it.

Since

1.7.1