| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>Abs (number)</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- number = any valid number or numeric variable
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Use this command to return the absolute value of a number; meaning its positive value. A negative 3 would become a positive 3. If what you want is a number without a fraction (say, convert 3.1415 into 3) use the Int() command.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/Abs.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- number=-3
<br />
-
<br />
- Print "The absolute value of " + number + " is: " + Abs(number)
<br />
-
<br />
- WaitKey()
<br />
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Abs&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|