Angle of Trajectory?

This is a discussion on Angle of Trajectory? within the Game Programming forums, part of the General Programming Boards category; I'm trying to create a bullet class that stores the bullets current position (x,y,z) and its trajectory. Traditionally I've used ...

Angle of Trajectory?

I'm trying to create a bullet class that stores the bullets current position (x,y,z) and its trajectory. Traditionally I've used 3 variables called xtraject, ytraject, and ztraject where each loop xtraject was added to x and same for y/z. So in order to get the bullet travelling upper right at a 45 degree angle xtraject and ytraject would be 1. I'm want to have bullets that can fire at arbitrary angles, perhaps just have an angle variable (maybe I would need 2?) to control which way it goes and then a speed to say how fast its moving.

"The best way to get answers is to just keep working the problem, recognizing when you are stalled, and directing the search pattern.....Don’t just wait for The Right Thing to strike you – try everything you think might even be in the right direction, so you can collect clues about the nature of the problem."
-John Carmack

Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie