Jump to content
Xtreme .Net Talk

Recommended Posts

  • Leaders
Posted

Divide the number by 0.05, round it to the nearest integer, and then multiply by 0.05.

 

0.14 / 0.05 = 2.8 -> 3, 3 * 0.05 = 0.15

2.52 / 0.05 = 50.4 -> 50, 50 * 0.05 = 2.50

:)

 

 

Rounding to the nearest integer being Math.Round(num, 0)

Iceplug, USN

One of my coworkers thinks that I believe that drawing bullets is the most efficient way of drawing bullets. Whatever!!! :-(

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...