How do I determine the target coordinates based on an angle?

86 Views Asked by At

I know my object is at a set of coordinates for example (150,480), and I need to move it x number of units at a y degree angle. Z

What is the formula to calculate this?

I slacked in math after Algebra II, and I've gotten pretty rusty - most of my programming work done since then requires only the simplest of algebra - so some explanation would be appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

The new coordinates would be:

$$(150 + x \cos y, 480+x\sin y)$$ assuming the angle $y$ is measured from the positive direction of the $x$-axis counterclockwise, as on the picture below.

wikipedia polar angle

Image from Wikipedia, Polar coordinate system.