|
-
Oct 6th, 2000, 10:51 PM
#1
Thread Starter
Addicted Member
How do I round to the nearest 0.5?
eg. I have the number 0.6, how do I round it to 0.5? Or 0.8 to 1? 0.6 to 0.5?
Thanks.
-Git
-
Oct 6th, 2000, 11:03 PM
#2
Member
try this
MyNumber = Int(MyNumber)
Chris Davidsen
Christian Davidsen
If you go to sleep with an itchy
ass, you wake up with smelly fingers.
-
Oct 6th, 2000, 11:21 PM
#3
Thread Starter
Addicted Member
Nope, that's not quite what I want. I want it to round to the nearest 0.5.
So 0.7 would goto 0.5, 0.9 would goto 1, 0.3 would goto 0.5, 0.1 would goto 0, etc...
Thanks anyway.
-Git
-
Oct 7th, 2000, 07:39 AM
#4
Frenzied Member
If you use VB6 you can use the Round function to round a number...
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 7th, 2000, 10:01 AM
#5
Thread Starter
Addicted Member
Nope - I meant so it will round in intervals of 0.5, not 1.
I've figured it out now anyway.
-Git
-
Oct 7th, 2000, 10:18 AM
#6
Frenzied Member
How did you managed that? I want to see because I'm unsure of you're trying to acomplish, it may be handy for me sometime!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Oct 7th, 2000, 07:16 PM
#7
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|