Sign()

语法

Result.f = Sign(Number.f)
概要
Returns a floating-point value representing the sign of the given number.

参数

Number.f The number to get the sign from.

返回值

- Returns 0 if Number is zero.
- Returns 1 if Number is positive.
- Returns -1 if Number is negative.

Remarks

This function can handle float and double values.

示例

  Debug Sign(-7)   ; will display -1.0
  Debug Sign(0)    ; will display 0.0
  Debug Sign(7)    ; will display 1.0

参阅

Abs()

已支持操作系统

所有

<- Round() - Math Index - Sin() ->