i made my own topic out of this, but hell, why not post it here. this topic needs some reviving:
i just gone done reading the trigonometry in actionscript chapter in the book macromedia flash mx game design demystified. just thought u might want to know about trigonometry in flash. lol, happy new years if it has already happened where u live. if not, (like where i live), happy new years eve!
points to remember
-trigonometry is the branch of mathematics that deals with the relationships between the sides and angles of triangles.
-in game programming, trigonometry is used to help determine trajecteories, distances, and deflection after collision, to name a few of its functions.
-flash uses the grid-based cartesian coordinate system to idenify, place, and move objects.
-by default, the registration point of a flash movie clip is the upper-left hand corner of the stage or movie.
-the unit of measurement that flash uses for angles is not degrees, but radians. you can easily convert from one unit of measurement to the other to work in a more familiar manner. the one exception to having to use radians in flash is when u r changing the _rotation property of a movie clip.
-you can use the pythagorean theorem to find the distance between two points.
-the trigonometric function sin, cosine, and tanget use various ratios of the triangle side lengths to determine values and, used inversely, to delever results as angles.
a vector is a mathematical object that has both magnitude (a numeric value) and a direction. for example, velocity is a vector because it has both magnitude and direction. vectors can be divided up into x and y components to project it along the axes of the coordinate system. this is called resolving a vector.