VectorUnitize

Unitizes, or normalizes, a 3-D vector. Note, zero vectors cannot be unitized.

Syntax

rhinoscriptsyntax.VectorUnitize (vector)

rhinoscript.pointvector.VectorUnitize (vector)

Parameters

vector

Required.  List of 3 numbers or Vector3d.  The 3-D vector to unitize.

Returns

Vector3d

The resulting 3-D vector if successful.

None

On error.

Example

import rhinoscriptsyntax as rs

vector = rs.VectorUnitize( [1.5,-4.1,3.6] )

print vector

Also See

IsVectorZero

VectorCreate