OsApproxEquals

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
{{osslfunc
 
{{osslfunc
|threat_level=None
 
 
|permissions=true
 
|permissions=true
|delay=0
 
 
|function_syntax= integer osApproxEquals(float a, float b)<br/>
 
|function_syntax= integer osApproxEquals(float a, float b)<br/>
 
integer osApproxEquals(vector va, vector vb)<br/>
 
integer osApproxEquals(vector va, vector vb)<br/>

Revision as of 13:59, 20 February 2019

integer osApproxEquals(float a, float b)

integer osApproxEquals(vector va, vector vb)
integer osApproxEquals(rotation ra, rotation rb)
integer osApproxEquals(float a, float b, float margin)
integer osApproxEquals(vector va, vector vb, float margin)
integer osApproxEquals(rotation ra, rotation rb, float margin)

Returns 1 (true) if the quantities or all their components do not differ by the margin value, or 1e-6, if margin is not provided. Returns 0 (false) otherwise.
Threat Level No threat level specified
Permissions Use of this function is always allowed by default
Delay No function delay specified
Example(s)
...
if(osApproxEquals(pos, otherpos, 1e-2)) // on Xengine use if(osApproxEquals(pos, otherpos, 1e-2) == 1)
    llOwnerSay("Positions are almost equal");
...
Notes
Implemented November 20, 2018


Personal tools
General
About This Wiki