abs: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (fixed formatting, removed arg local)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|game1= ofp


|1.00
|version1 = 1.00
 
|arg= local


|gr1= Math
|gr1= Math


| Absolute value of a real number
|descr= Returns absolute (positive) value of a real number.


| [[Number]] <nowiki>=</nowiki> '''abs''' n
|s1= [[Number]] <nowiki>=</nowiki> '''abs''' n


|p1= n: [[Number]]
|p1= n: [[Number]]


| [[Number]]
|r1= [[Number]]
   
   
|x1= <code>_n = [[abs]] -3;</code>
|x1= <code>_n = [[abs]] -3; {{cc|Returns 3}}</code>
Returns 3


|[[Math Commands]]
|seealso= [[+]] [[-]]
}}
}}



Revision as of 02:29, 5 February 2021

Hover & click on the images for description

Description

Description:
Returns absolute (positive) value of a real number.
Groups:
Math

Syntax

Syntax:
Number = abs n
Parameters:
n: Number
Return Value:
Number

Examples

Example 1:
_n = abs -3; // Returns 3

Additional Information

See also:
+ -

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