Math brain fart

BlitzMax Forums/BlitzMax Beginners Area/Math brain fart

ima747(Posted 2011) [#1]
My brain just gave out on me, I can't remember even the terms I would need to google this, most frustrating...

I have an angle and distance from a point (0,0 for simplictiy), how do I figure out the X/Y values at the point at that distance, at that angle?


JazzieB(Posted 2011) [#2]
You need to use Sin and CoS with the angle, which is then multiplied by the distance to get the X and Y position. Can't remember if you use Sin for X and CoS for Y, or it's the other way around!


GfK(Posted 2011) [#3]
NewX = Cos(angle) * dist + OldX
NewY = Sin(angle) * dist + OldY



ima747(Posted 2011) [#4]
thank you! my poor brain(s)!