Garry's Mod Wiki

Revision Difference

math.EaseInOut#527728

<function name="EaseInOut" parent="math" type="libraryfunc"> <description>Calculates the progress of a value fraction, taking in to account given easing fractions</description> <realm>Shared and Menu</realm> <file line="60-L91">lua/includes/extensions/math.lua</file> <file line="54-L85">lua/includes/extensions/math.lua</file> <args> <arg name="progress" type="number">Fraction of the progress to ease, from 0 to 1</arg> <arg name="easeIn" type="number">Fraction of how much easing to begin with</arg> <arg name="easeOut" type="number">Fraction of how much easing to end with</arg> </args> <rets> <ret name="" type="number">"Eased" Value, from 0 to 1</ret> </rets> </function> <example> <description>Calculates the easing of three situations</description> <code> 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)) </code> <output> 0.055555... 0.166666... 0.277777... </output> </example>