smoothReturnNormalizeRange

open fun smoothReturnNormalizeRange(x: Float, start: Float, end: Float): Float

Translates a value in a (start,end) range into a "back-and-forth" value in a (0,1) range with smooth ease in and ease out.

Return

smooth "back-and-forth" float value equals to 0 at start and end, and 1 at the mid-point between them

Parameters

x

Float clamped from start to end

start

range minimal value

end

range maximal value