IsFloatNearlyZero: Difference between revisions

From Onset Developer Wiki
28days (talk | contribs)
No edit summary
Justus (talk | contribs)
m more see also links
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
if IsFloatNearlyZero(GetPlayerHealth()) then
AddPlayerChat("You are about to die")
end
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
* [[RandomFloat]]
* [[RandomFloat]]
* [[Base64Encode]]
* [[Base64Decode]]
* [[GetPlayerHealth]]
* [[SetPlayerHealth]]
* [[GetPlayerArmor]]
* [[SetPlayerArmor]]

Latest revision as of 17:50, 21 December 2019

IsFloatNearlyZero

Type: Function
Context: Client
Introduced: v1.0

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

See also