Previous: Two-operand (binary) forms, Up: Arithmetic



3.1.4.2 Unary forms

Unary or one-operand forms are summarized in the following table, where X stands for the operand.

Op Operand Result Description
-X scalar scalar Unary scalar negation.
-X vector vector Unary vector negation.
|X| vector scalar Vector length.
unit(X) vector vector Unit vector with same direction.
sqrt(X) scalar scalar Scalar square root.
sin(X) scalar scalar Trigonometric sine (X in degrees).
cos(X) scalar scalar Trigonometric cosine (X in degrees).
atan2(X,Y) scalar scalar Polar angle in degrees of vector [X,Y].
inverse(X) transform transform Inverse transform.


Errors are reported when |X|, unit, sqrt, atan2, and inverse fail due to bad parameters.