Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I have a problem with the "angle" command between two vectors. When i try to compute the angle (in degrees) between two vectors that should be at 180' to each other comes instead 179,99999'.

I really don't know what it is, everything looks good: maybe can be a bug?

Thanks in advance for the help!

Stefano///

Views: 920

Attachments:

Replies to This Discussion

It almost is 180 degrees, the difference is minimal. When floating point numbers are used in mathematical operations such as multiplication or subtraction or what have you the trailing digits lose accuracy. This is an inevitable side-effect of using fixed-size floating point numerics.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Will reducing angular precision in rhino help ?

Thanks a lot David & Mateusz,

Your help had been very precious!

I putted the output of the angle component in an 'integer primitive' and finally i had the correct values... 

The long explanation of what David is saying can be found here:

http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Thanks a lot Arend, i red only the beginning to be honest because i'm quite busy at the moment but it looks very interesting!


I would never say in my life as an architect to study something like that, but that's how it goes!

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