Math brain fart
BlitzMax Forums/BlitzMax Beginners Area/Math brain fart
| ||
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? |
| ||
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! |
| ||
NewX = Cos(angle) * dist + OldX NewY = Sin(angle) * dist + OldY |
| ||
thank you! my poor brain(s)! |