sign(x: f64) → f64

Category: [math](builtinsmath)_

The sign of x: 1, -1, or 0.

ParameterTypeDescriptionRemarks
xf64The input value.
returnsf64The result.
wcl
sign(-3.0)   // negative input -> -1.0 → -1.0