Neg - ObjectVision/GeoDMS GitHub Wiki
Arithmetic functions negative (-)
- neg(a)
- - a
neg(a) or - a results in the negative values of data item a.
Data item or unit with Numeric value type
Since GeoDMS 20.23.1 the negation of an unsigned value that is larger than the largest signed value of the same width, the value type of the result, is an error. Before, it wrapped around: neg(uint8(200)) resulted in 56. A null remains null.
1. attribute<float32> negA (ADomain) := neg(A);
2. attribute<float32> negA (ADomain) := - A;
| A | negA |
|---|---|
| 0 | 0 |
| 1 | -1 |
| -2 | 2 |
| 3.6 | -3.6 |
| 999 | -999 |
ADomain, nr of rows = 5