I have:
private double AngleToRadians(double angle)
{
return (Math.PI / 180) * angle;
}
double x = 30, y = 60;
var dist = 10;
var angle = 120;
x = x + dist * Math.Cos(AngleToRadians(angle));
y = y + dist * Math.Sin(AngleToRadians(angle));
What this does is returns me a new coordinate, 10 points into direction (angle) from (x,y) starting point.
This works correctly in top-right quadrant, but does not on any of other three.
Is there a formula that would work in all 4?