Skip to main content

norm

Discworld driver help

norm

Name

norm - return the norm of a vector

Synopsis

float norm( vector v );

Description

"vector" is not actually a type in LPC. It is used here to represent an array of ints and/or floats.

norm( v ) returns the norm of the vector `v'. This is defined as the length of the vector. If `v' is thought of as a coordinate, norm( v ) returns the distance between `v' and the origin.

See also

vectors, dotprod(), distance(), angle()