sign(x: f64) → f64
Category: [math](builtinsmath)_
The sign of x: 1, -1, or 0.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| x | f64 | The input value. | — |
| returns | f64 | The result. | — |
wcl
sign(-3.0) // negative input -> -1.0 → -1.0sign(x: f64) → f64
Category: [math](builtinsmath)_
The sign of x: 1, -1, or 0.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| x | f64 | The input value. | — |
| returns | f64 | The result. | — |
sign(-3.0) // negative input -> -1.0 → -1.0