On 26.07.2008 19:46, Amir Taaki wrote:
Hi!Since this calculate potentially gets done very many times per frame, I'd like to minimise the heaviness of it- what's fastest way to tell if point C lies between A-B?c = C - A I'd do c^ = AB^ (when unit vectors) and if |c| < |AB|But is it possible to avoid the square root in converting them to unit vectors, possibly by some other method? Thanks
Just skip it. When comparing distances it doesn't matter if you just compare the sum of squares with or without rooting it.
-f.r.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Crystal-main mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crystal-main Unsubscribe: mailto:[EMAIL PROTECTED]
