Hmmm …

rhinoscriptsyntax docs do not help so much …

VectorCompare

Compares two 3-D vectors.

Syntax

rhinoscriptsyntax.VectorCompare (vector1, vector2)

rhinoscript.pointvector.VectorCompare (vector1, vector2)

Parameters

vector1

Required. List of 3 numbers, Point3d, or Vector3d. The first 3-D vector to compare.

vector2

Required. List of 3 numbers, Point3d, or Vector3d. The second 3-D vector to compare.

Returns

-1

If vector1 is less than vector2.

0

If vector1 is equal to vector2.

1

If vector1 is greater than vector2.

None

On error.

… but looking into pointvector.py, we cab see that …

```
def VectorCompare(vector1, vector2):
"""Compares two 3D vectors
Parameters:
vector1, vector2 = the vectors to compare
Returns:
-1 if vector1 is less than vector2
0 if vector1 is equal to vector2
1 if vector1 is greater than vector2
"""
vector1 = rhutil.coerce3dvector(vector1, True)
vector2 = rhutil.coerce3dvector(vector2, True)
return vector1.CompareTo(vector2)
```

… the method used here is

Rhino.Geometry.Vector3d.CompareTo().

… And looking at RhinoCommon docs we can finally understand …

Visual Basic

Public Function CompareTo ( _

other As Vector3d _

) As Integer

Parameters

other

Type: Rhino.Geometry.Vector3d

The other Vector3d to use in comparison.

Return Value

0: if this is identical to other

-1: if this.X < other.X

-1: if this.X == other.X and this.Y < other.Y

-1: if this.X == other.X and this.Y == other.Y and this.Z < other.Z

+1: otherwise.

… what that code is doing.

Definitely not the best documented rhinoscriptsyntax method …