BIS fnc isEqualVector: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(created page)
 
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Vectors


<!---|arg= local |Multiplayer Arguments=--->
|descr= Checks whether two vectors are equal with given tolerance.


<!---|eff= local |Multiplayer Effects=--->
|s1= [vector1, vector2, tolerance] call [[BIS_fnc_isEqualVector]]


| <pre>/*
|p1= vector1: [[Array]] - vector 1
Author: Nelson Duarte <@Nelson_G_Duarte>


Description:
|p2= vector2: [[Array]] - vector 2
Whether two vectors are equal with given tolerance


Parameter(s):
|p3= tolerance: [[Number]] - the tolerance
_this select 0: Array - The first vector
_this select 1: Array - The second vector
_this select 2: Number - The tolerance


Returns:
|r1= [[Boolean]] - returns [[true]] if in tolerance, otherwise [[false]]
bool - True if equal, false if not
*/</pre>{{Informative|Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]]}} |Description=


|[] call [[BIS_fnc_isEqualVector]]|Syntax=
|x1= <sqf>[[1,1,1], [2,2,2], 1] call BIS_fnc_isEqualVector; // returns true</sqf>


|p1= parameter: Datatype - (Optional, default defValue) description |Parameter 1=
|seealso= [[isEqualTo]] [[isEqualTypeAny]]
 
|Datatype - description|Return value=
 
|x1= <code></code>|Example 1=
 
| |See also=
}}
}}
[[Category:Function Group: Math|{{uc:isEqualVector}}]]
[[Category:Functions|{{uc:isEqualVector}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:isEqualVector}}]]

Latest revision as of 15:51, 8 November 2023

Hover & click on the images for description

Description

Description:
Checks whether two vectors are equal with given tolerance.
Execution:
call
Groups:
Vectors

Syntax

Syntax:
[vector1, vector2, tolerance] call BIS_fnc_isEqualVector
Parameters:
vector1: Array - vector 1
vector2: Array - vector 2
tolerance: Number - the tolerance
Return Value:
Boolean - returns true if in tolerance, otherwise false

Examples

Example 1:
[[1,1,1], [2,2,2], 1] call BIS_fnc_isEqualVector; // returns true

Additional Information

See also:
isEqualTo isEqualTypeAny

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note