# math/EaseInOut

From Garry's Mod

(Difference between revisions)

m (Also menu state) |
(update source lines) |
||

Line 1: | Line 1: | ||

{{Func | {{Func | ||

− | |||

− | |||

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

|Realm=Shared and Menu | |Realm=Shared and Menu | ||

|IsClass=No | |IsClass=No | ||

|File=lua/includes/extensions/math.lua | |File=lua/includes/extensions/math.lua | ||

− | |Line= | + | |Line=60-L91 |

}} | }} | ||

{{Arg | {{Arg |

## Latest revision as of 16:49, 15 November 2016

## Contents |

# Description

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

# Arguments

number progress

Fraction of the progress to ease

# Arguments

number easeIn

Fraction of how much easing to begin with

# Arguments

number easeOut

Fraction of how much easing to end with

# Returns

Eased Value

# Examples

## 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...