IsFloatNearlyZero: Difference between revisions
From Onset Developer Wiki
No edit summary |
m basic example |
||
Line 11: | Line 11: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
if IsFloatNearlyZero(GetPlayerHealth()) then | |||
AddPlayerChat("You are about to die") | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[RandomFloat]] | * [[RandomFloat]] |
Revision as of 17:48, 21 December 2019
Description
Checks if a float value is nearly zero.
Syntax
IsFloatNearlyZero(Value)
Parameters
- Value
The float value
Return Value
- Returns true if success.
Example
if IsFloatNearlyZero(GetPlayerHealth()) then
AddPlayerChat("You are about to die")
end