Angle difference
#4
@MasterGy yours looks more clunky than mine, if mine is always correct you will be interested, it will save you from loops.

@OldMoses yours I can immediately apply with spider code and not even have to convert dx, dy's to an angle heading. Mine might be less calculation if I had the heading already calculated which for spiders I don't.
But I am thinking it might be handy to use speed with heading for dx, dy calc's. It is also interesting that a vector solution has crept into my trig problem. I might get an insight into vector stuff from this.  Smile

But what is SpinnerDot? It looks like you compare to Cos(30 degrees) not straight 30 degrees.


Next how to test all our solutions to 
1. make sure they are always correct and then 2. which is speediest?

Hmm... also I was assuming the difference as absolute value, always positive. But if I want to apply to one or the other angles I guess I need both pos and neg solutions.

BTW I was thinking Function looks like:
AngleDifferenceD(degrees1, degrees2)
AngleDifferenceR(radians1, radians2)
b = b + ...
Reply


Messages In This Thread
Angle difference - by bplus - 01-31-2023, 05:04 PM
RE: Angle difference - by MasterGy - 01-31-2023, 05:50 PM
RE: Angle difference - by OldMoses - 01-31-2023, 06:15 PM
RE: Angle difference - by bplus - 01-31-2023, 06:44 PM
RE: Angle difference - by OldMoses - 01-31-2023, 07:33 PM
RE: Angle difference - by bplus - 01-31-2023, 08:12 PM
RE: Angle difference - by OldMoses - 01-31-2023, 10:32 PM
RE: Angle difference - by SMcNeill - 01-31-2023, 09:29 PM
RE: Angle difference - by bplus - 01-31-2023, 10:03 PM



Users browsing this thread: 2 Guest(s)