floor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
(formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma1
|game1= arma1


|1.00
|version1= 1.00
 
|game2= arma2
 
|version2= 1.00
 
|game3= arma2oa
 
|version3= 1.51
 
|game4= tkoh
 
|version4= 1.00
 
|game5= arma3
 
|version5= 1.00


|gr1= Math
|gr1= Math


| Returns the next lowest integer in relation to x.
|descr= Returns the next lowest integer in relation to '''x'''.


| [[Number]] <nowiki>=</nowiki> '''floor''' x
|s1= '''floor''' x


|p1=  x: [[Number]]
|p1=  x: [[Number]]


| [[Number]]
|r1= [[Number]]
   
   
|x1= <pre>floor 5.25</pre>
|x1= <code>[[floor]] 5.25; {{cc|Result is 5}}</code>
Result is 5
|x2= <pre>floor -5.25</pre>
Result is -6


|seealso= [[ceil]], [[round]], [[linearConversion]], [[Math Commands]]
|x2= <code>[[floor]] [[-]]5.25; {{cc|Result is 6}}</code>
 
|seealso= [[ceil]] [[round]] [[linearConversion]]
}}
}}
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 12:47, 14 March 2021

Hover & click on the images for description

Description

Description:
Returns the next lowest integer in relation to x.
Groups:
Math

Syntax

Syntax:
floor x
Parameters:
x: Number
Return Value:
Number

Examples

Example 1:
floor 5.25; // Result is 5
Example 2:
floor -5.25; // Result is 6

Additional Information

See also:
ceil round linearConversion

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