It's been over 20 years since I've had to do trig, so forgive me if this seems like a complete 101 question.
I need two single formulas that will swap the x,y depending on quadrant. The solution will be Px or Py. The angles are simple, 0,90,180,-90 (software won't take 270) provided by the user.
Px and Py are provided from a table (for instance Px=0.4A, Py=18B).
First formula (X position):
If theta = 0, X = Px; if theta = 90, X = Py; if theta = 180 X = -Px; if theta = -90, X = -Py
Second formula (Y position):
If theta = 0, Y = Py; if theta = 90, Y = Px; if theta = 180, Y = -Py; if theta = -90, Y = -Px
Thanks in advance
I need two single formulas that will swap the x,y depending on quadrant. The solution will be Px or Py. The angles are simple, 0,90,180,-90 (software won't take 270) provided by the user.
Px and Py are provided from a table (for instance Px=0.4A, Py=18B).
First formula (X position):
If theta = 0, X = Px; if theta = 90, X = Py; if theta = 180 X = -Px; if theta = -90, X = -Py
Second formula (Y position):
If theta = 0, Y = Py; if theta = 90, Y = Px; if theta = 180, Y = -Py; if theta = -90, Y = -Px
Thanks in advance