BIS fnc cutDecimals: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Added params syntax & examples.)
Line 8: Line 8:
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| Function that rounds specified number to specified amount of decimals. |= Description
/************************************************************
cut Decimals
 
rounds a number to the given amount of decimal places
************************************************************/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_cutDecimals]]; --> |= Syntax
| param call [[BIS_fnc_cutDecimals]]; |= Syntax


|p1= |= Parameter 1
|p1= [[Number]] - Decimal number to round. |= Parameter 1
|p2= [[Number]] - Amount of decimals to round to (starts with 0). |=


| |= Return value
| [[Number]] - Rounded number. |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>cutDecimals = [33.3333,1] call BIS_fnc_cutDecimals; // returns 33.3</code> |=  
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 23:13, 1 October 2014


Hover & click on the images for description

Description

Description:
Function that rounds specified number to specified amount of decimals.
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
param call BIS_fnc_cutDecimals;
Parameters:
Number - Decimal number to round.
Number - Amount of decimals to round to (starts with 0).
Return Value:
Number - Rounded number.

Examples

Example 1:
cutDecimals = [33.3333,1] call BIS_fnc_cutDecimals; // returns 33.3

Additional Information

See also:
See also needed

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

Notes

Bottom Section