VectorLength

Returns the length of a 3-D vector.

Syntax

rhinoscriptsyntax.VectorLength (vector)

rhinoscript.pointvector.VectorLength (vector)

Parameters

vector

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

Returns

Double

The length of the vector, if successful.

None

On error.

Example

import rhinoscriptsyntax as rs

point1 = rs.GetPoint("First point")

point2 = rs.GetPoint("Next point")

vector = rs.VectorCreate(point1, point2)

print rs.VectorLength(vector)

Also See

VectorAdd

VectorCreate

VectorSubtract

VectorUnitize