Sgn.htm 1013 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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>Sgn (number)</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. number=float or integer
  13. </td>
  14. </tr>
  15. </table>
  16. <h1>Description</h1>
  17. <table>
  18. <tr>
  19. <td>
  20. This function is used to determine whether a number or value is greater than 0, equal to 0 or less than 0. Note: non-integer values return the sign to 7 signigicant figures. (e.g. -1.000000)
  21. </td>
  22. </tr>
  23. </table>
  24. <h1><a href=../2d_examples/Sgn.bb>Example</a></h1>
  25. <table>
  26. <tr>
  27. <td>
  28. Print Sgn(10) ; prints 1 <br />
  29. Print Sgn(5.5) ; prints 1.000000 <br />
  30. Print Sgn(0) ; prints 0 <br />
  31. Print Sgn(0.0) ; prints 0.000000 <br />
  32. Print Sgn(-5.5) ; prints -1.000000 <br />
  33. Print Sgn(-10) ; prints -1 <br />
  34. </td>
  35. </tr>
  36. </table>
  37. <br>
  38. <a target=_top href=../index.htm>Index</a><br>
  39. <br>
  40. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=Sgn&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  41. </html>