Garry's Mod Wiki

Revision Difference

math.IsNearlyZero#563323

<cat>libraryfunc</cat> <function name="IsNearlyZero" parent="math" type="libraryfunc"> <description>Checks if a floating point number is nearly zero.</description> <description>Checks if a floating point number is nearly zero. See <page>math.IsNearlyEqual</page> for more information.</description> <realm>Shared and Menu</realm> <added>2025.01.22</added> <file line="263-L269">lua/includes/extensions/math.lua</file> <args> <arg name="a" type="number">The number to compare.</arg> <arg name="tolerance" type="number" default="1e-8">The maximum difference between the number and zero to consider them equal.</arg> </args> <rets> <ret name="" type="boolean">True if the difference between the number and zero is less than or equal to the tolerance.</ret> </rets> </function>