Global Function

smoothstep()

Declaration

func smoothstep(startValue: Double, endValue: Double, t: Double) -> Double

Parameters

startValue
endValue
t

Returns

Double

Description

Calculate a position between startValue and endValue given the value t. t is a number 0 to 1. 0 is at startValue, 1 is at endValue. Smoothstep implements a cubic Hermite interpolation, which results in what is commonly refered to as a ease-in and ease-out in the resulting curve.

Smoothstep at wikipedia.

Examples

Related

lerp()