Garry's Mod Wiki

Revision Difference

math.EaseInOut#511578

<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>⤶ <args>⤶ <arg name="progress" type="number">Fraction of the progress to ease</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</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>