# sign proc

Source: https://ref.dm-lang.org/proc/sign
Added in BYOND 516.

### Format
> `sign(A)`

### Returns
> 1 if A \> 0, -1 if A \< 0, 0 if A == 0

### Args
> A: A number or a [vector](https://ref.dm-lang.org/vector/index.md).

Returns the sign of A. If used with a vector, a new vector is returned where `sign()` has been applied to each component.

```dm /sign/
usr << sign(20) // outputs 1
usr << sign(0)  // outputs 0
usr << sign(-3) // outputs -1
```

### See also
- [floor proc](https://ref.dm-lang.org/proc/floor.md)
- [ceil proc](https://ref.dm-lang.org/proc/ceil.md)
- [round proc](https://ref.dm-lang.org/proc/round.md)
- [trunc proc](https://ref.dm-lang.org/proc/trunc.md)
- [fract proc](https://ref.dm-lang.org/proc/fract.md)
