Garry's Mod Wiki

math.EaseInOut

  number math.EaseInOut( number progress, number easeIn, number easeOut )

Description

Calculates the progress of a value fraction, taking in to account given easing fractions

Arguments

1 number progress
Fraction of the progress to ease, from 0 to 1
2 number easeIn
Fraction of how much easing to begin with
3 number easeOut
Fraction of how much easing to end with

Returns

1 number
"Eased" Value, from 0 to 1

Example

Calculates the easing of three situations

print(math.EaseInOut(0.1, 0.1, 0.1)) print(math.EaseInOut(0.2, 0.1, 0.1)) print(math.EaseInOut(0.3, 0.1, 0.1))
Output: 0.055555... 0.166666... 0.277777...