Files
BlitzNext/_release/help/commands/2d_commands/Abs.htm
T

42 lines
972 B
HTML
Raw Normal View History

2014-12-08 12:43:20 +13:00
<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()
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
2014-02-26 16:08:39 +13:00
</td>
2014-12-08 12:43:20 +13:00
</tr>
2014-02-26 16:08:39 +13:00
</table>