A direction is a sequence of turns separated by unit distances. A turn is expressed in multiples of pi/10, so a u-turn is +5 or -5. Positive values mean CCW turns.
We start at origin, heading towards (1,0)
If I use relative turns (think "turn left", not "go north"), how can I determine if two directions are equivalent (i.e. they lead to the same point)?
For example, [+1, -2] and [-1, +2], lead to the same point (phi, 0)
Or [+1, +2, +3] equals [+3] or [+5, -2, -3]
I know that if I use unit distances I can simply trig my way down to the destination, round the values down to a single decimal and compare them directly, but what if I don't want to or can't use trigonometric functions at all?
Will switching to absolute (i.e., always measure the turns from A+(1,0)) turns help?
P.S. Extra geek cred to the one who can guess what task I need this for.
We start at origin, heading towards (1,0)
If I use relative turns (think "turn left", not "go north"), how can I determine if two directions are equivalent (i.e. they lead to the same point)?
For example, [+1, -2] and [-1, +2], lead to the same point (phi, 0)
Or [+1, +2, +3] equals [+3] or [+5, -2, -3]
I know that if I use unit distances I can simply trig my way down to the destination, round the values down to a single decimal and compare them directly, but what if I don't want to or can't use trigonometric functions at all?
Will switching to absolute (i.e., always measure the turns from A+(1,0)) turns help?
P.S. Extra geek cred to the one who can guess what task I need this for.
Comment