dos_unitp - dalefugier/DOSLib GitHub Wiki

Determines if a 2D or 3D vector is a unit vector.

Syntax

(dos_unitp vector)

Parameters

vector

The vector.

Returns

T if the vector is a unit vector.

nil if the vector is not a unit vector, or on error.

Example

Command: (dos_unitp (dos_unitize '(2 1)))
T
Command: (dos_unitp '(2 1))
nil