Hiya, so if I have a vector like [dx,dy] and I want to work out the vector which is at a right angle to it (or a left angle), basically 90 degrees left or right, is there a quick way to work this out as at the moment all I can think of is:
Use pythagoras to get the radius from origin. Work out angle of line from 0 degress. Subtract or add 90 degress to the angle. Use standard dx = r*cos(angle) and dy=r*sin(angle).
Just seems a bit long-winded. I'm pretty sure there must be a better options using quadrants or something.
Any ideas? Thanks.
Use pythagoras to get the radius from origin. Work out angle of line from 0 degress. Subtract or add 90 degress to the angle. Use standard dx = r*cos(angle) and dy=r*sin(angle).
Just seems a bit long-winded. I'm pretty sure there must be a better options using quadrants or something.
Any ideas? Thanks.