Advertisement

Rounding up/down

Started by February 03, 2000 10:33 AM
0 comments, last by Zombie 24 years, 10 months ago
How can I round a number up/down to a nearest in one of these- 0,50,100,150,200,250,300 (in VB)?
Assign the number to a float,
Divide by 50.
Add 0.5.
Assign to an Integer
Multiply by 50.
If greater than 300, set to 300.
If less than 0 set to 0.

This topic is closed to new replies.

Advertisement