moveTowards

open fun moveTowards(current: Double, target: Double, maxDelta: Double): Double
open fun moveTowards(current: Float, target: Float, maxDelta: Float): Float

Moves a value current towards target.

Return

The new value.

Parameters

current

The current value.

target

The value to move towards.

maxDelta

The maximum change that should be applied to the value.