Verifies that a vector is zero, or tiny - the x,y,z elements are equal to 0.0.
rhinoscriptsyntax.IsVectorZero (vector)
rhinoscript.pointvector.IsVectorZero (vector)
vector |
Required. List of 3 numbers, Point3d, or Vector3d. The 3-D vector to test. |
Boolean |
True if the vector is zero, otherwise False, if successful. |
None |
On error. |
import rhinoscriptsyntax as rs
pt1 = rs.GetPoint("First point")
pt2 = rs.GetPoint("Next point")
vector = pt2 - pt1
if rs.IsVectorZero(vector):
print "The vector is zero."
else:
print "The vector is not zero."