Files
BlitzNext/_release/help/commands/2d_commands/Floor.htm
T
2014-02-26 16:08:39 +13:00

13 lines
1.4 KiB
HTML

<html><head><title>Command: Floor# </title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='../css/commands.css' type='text/css'></head><body><span class='Command'>&nbsp;&nbsp;Floor# (float)&nbsp;&nbsp;</span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Rounds a decimal floating variable down to the nearest whole number.</td></tr></table><span class='header'><br>Parameter Description:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>float=floating point number</td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Many times, you will need to round up or down a floating point decimal variable. This command rounds it down to the nearest whole number. Use <a href='Ceil#.htm'>Ceil#</a> to round the number up.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>; Floor#/Ceil# Example<br>
<br>
; Set a floating point variable<br>
myVal#=0.5<br>
<br>
; Round it up<br>
Print Floor#(myval)<br>
<br>
;Round it down<br>
Print Ceil#(myval)<br>
</td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
</html>