Vunit()

From TinyMUX
Revision as of 16:55, 25 November 2010 by Ihavenomouth (talk | contribs) (New page: Category:Functions {{Function|vunit(<vector>[,<delimiter>])}} Returns the unit vector (a vector of magnitude 1) which points in the same direction as the given vector. == Example =...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


vunit(<vector>[,<delimiter>])

Returns the unit vector (a vector of magnitude 1) which points in the same direction as the given vector.


Example

> think vunit(2 0 0)

1 0 0

> think vmul(vunit(5 6 7),vmag(5 6 7))

5 6 7

Related Topics

vdim(), vmag()