smoothToRange

open fun smoothToRange(x: Float, fromMin: Float, fromMax: Float, toMin: Float, toMax: Float): Float

Translates a value from a (fromMin,fromMax) range into a value in a (toMin,toMax) range with smooth ease in and ease out. Allows to segment the value of a timer or an effect level into different shorter sliders

Return

smoothed float value clamped at the from range, into the new range

Parameters

x
fromMin
fromMax
toMin
toMax