Jump to content
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  


Just signed up for the World of Warcraft stress test. I didn't get into the beta back when it started, and not being a real MMORPG fan I wasn't devastated. But from what I've heard, this one will be worth picking up, so I'm happy I get to play it in a couple of days, or whenever they open it for testing. It's downloading on my home computer as I write this.

On other news, I'm fucking starving, lunch won't be here for another 40 minutes...

What else? oh yea, I guess I'll finish this with another quick tip.

Never, EVER hardcode numbers, if you need to, use a const variable for it, this will describe what this number is being used for. Doing stuff like this:

float fAltitude = fCurrentAltitude * 0.304799f;

will just confuse the hell out of whoever tries to read your code, instead, do this:

const float fMetersToFeetRatio = 0.3040799f;
float fAltitude = fCurrentAltitude * fMetersToFeetRatio;

by doing it this way you don't have to guess what's going on, it's plain to see you're converting fCurrentAltitude from meters to feet.

And that concludes todays quick tip.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!