Skip to main content

sign

lq.sign(value)

Returns the sign of a number.

  • 0 for x=0x=0
  • 1 for x>0x>0
  • -1 for x<0x<0 Note that this is different from the built-in float.signum() which returns 1.0 for x=0x=0.
Parameters

value : int | float

The value to determine the sign of.