View Full Version : Vector Angle Error
Martin
11-03-2010, 08:05 AM
Hi,
If I check the Angle between two (almost) identical vectors with reversed Direction I get a math Domain Error.
I attached a Screenshot.
Thanks.
Martin
Steve Baer
11-03-2010, 03:58 PM
Hi Martin,
I see the bug. It think this will be fixed in the next WIP (I believe I got the fix in before the weekly automated build started.) I needed to clamp the dot product between -1 and 1. If there was any "fuzz" in the calculation which resulted in something like -1.00000000001, then acos would raise this exception.
If this isn't fixed in the next WIP, I'll get you the updated scripts through googlecode.
Thanks,
-Steve
Martin
11-04-2010, 02:55 PM
Thanks Steve.
That's great.
-Martin
Powered by vBulletin™ Version 4.0.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.