Abs.htm 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>Abs (number)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. number = any valid number or numeric variable
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. 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.
  21. </td>
  22. </tr>
  23. </table>
  24. <h1><a href=../2d_examples/Abs.bb>Example</a></h1>
  25. <table>
  26. <tr>
  27. <td>
  28. number=-3 <br />
  29. <br />
  30. Print "The absolute value of " + number + " is: " + Abs(number) <br />
  31. <br />
  32. WaitKey() <br />
  33. </td>
  34. </tr>
  35. </table>
  36. <br>
  37. <a target=_top href=../index.htm>Index</a><br>
  38. <br>
  39. 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>
  40. </html>