01-31-2023, 10:32 PM
(01-31-2023, 08:12 PM)bplus Wrote: When I was trying to include OldMoses code I got stuck a bit on converting Spinner_Dot to an angle but I went ahead with my adjustment to +/- returns of Angle Degree measure.
If you want the angle between two spiders movement vectors <.dx, .dy>, based on the return from Spinner_Dot :
angle in degrees = _R2D(_ACOS(Spinner_Dot(s1, s2)))
Spinner_Dot should return a SINGLE between 1 and -1. The same range as COS(0 - 180)
-1 = moving 180 degrees opposite each other
0 = moving on perpendicular courses
1 = moving parallel in same direction
Note: this only applies to unit vectors, which is why Spinner_Dot divides the components by the magnitudes
Dot product doesn't care about 180-360, it's treated the same as 0 to 180
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: