Jump to content
  • Advertisement
Sign in to follow this  
one mind

Rolls per second

This topic is 4292 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am retarded at math and need some help with a simple calculation. If a dice gets rolled 10,000,000 times in 2740 milliseconds, what is the rolls per second rate? Also, would it be a different calcuation if the milliseconds are under a second, eg, 1000 rolls in 345 milliseconds. What is the arithmetic to figure out rolls per second? Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
This is pretty basic stuff.

Operations per second = Number of ops / number of seconds

There are 1000 milliseconds in a second, so 2740 ms = 2740/1000 secs, so there are

ms/1000 seconds in a millisecond.

So the answer is ops/(ms/1000)

i.e. 1000*op/ms

Beware integer division though, you will probably need to cast the arguments to float or double (assuming C/C++).

[EDIT: Corrected deliberate mistake :)]

[Edited by - Paradigm Shifter on October 21, 2006 4:33:52 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!