Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The SIGN operation returns the sign of Value. If Value is negative, then -1 is returned. If Value is positive and greater than zero, then 1 is returned. If Value is exactly equal to zero, then 0 is returned.

Example

 
Code Block
// Get the sign of PI 
Val = "3.1415926535897932384626433832795" 
Result = SRP_Math("SIGN", Val) 
!! Result = 1 !! 
 

...

Code Block
// Get the sign of -PI 
Val = "-3.1415926535897932384626433832795" 
Result = SRP_Math("SIGN", Val) 
!! Result = -1 !! 
 

...

Code Block
// Get the sign of 0 
Result = SRP_Math("SIGN", 0) 
!! Result = 0 !!