Grasshopper

algorithmic modeling for Rhino

Can I easily check vectors for almost equality???

Views: 2488

Replies to This Discussion

Hi Marcus,

If what you want to test is the direction of the vectors, you can simply use the difference between 1 and the absolute value of the dot product of your two unitized vectors. If you want to compare the amplitude, it is a property of the Vector3D class.

or you can just subtract both and check the length of the result against a tolerance.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service