floor function in vb 6.0?
I was just wondering if there is a min function for VB 6.0? I am sure there is, but the book I have is just too basic and the website tutorials I have found leave a lot to be desired.
Basically I want 99 / 10, to be 9, in my program it is getting rounded up to 10.
Thanks guys
It''s been a while for me and I don''t have VB handy, but can''t you just do integer division? (i.e. 99 \ 10)
Also, you could just cast the result to an Int. This is from the MSDN...
Dim MyNumber as Int
MyNumber = Int(99.8) '' Returns 99
Also, you could just cast the result to an Int. This is from the MSDN...
Dim MyNumber as Int
MyNumber = Int(99.8) '' Returns 99
What''s the matter with you?
Why start talking about the C-standard library here, in a thread about VB 6.0?
My game: Swift blocks
Why start talking about the C-standard library here, in a thread about VB 6.0?
My game: Swift blocks
Thanks again guys...I had to change one variable to a float and then cast it to an int to get what I wanted, but once again you guys got me on the right path.
Thanks again
Thanks again
quote:Original post by Jambolo
There are floor and ceil functions in the standard C math library.
C!=VB 6.0 last time I checked.
-~-The Cow of Darkness-~-
If you see the image I am online
quote:Original post by kspbergstrom
Number = 99\10, where \ means int.div.
What if he wants the floor of any arbitrary float?
Jeez you guys. It doesn''t take that much effort to read a thread, and:
1. Figure out that special-case instructions and C libraries aren''t the right answer
2. Figure out that the right answer has already been posted
3. Not post whatever useless and redundant gibberish you might have had to say
It''s getting pretty disgusting around here.
quote:Original post by ApochPiQ
Jeez you guys. It doesn''t take that much effort to read a thread, and:
1. Figure out that special-case instructions and C libraries aren''t the right answer
2. Figure out that the right answer has already been posted
3. Not post whatever useless and redundant gibberish you might have had to say
It''s getting pretty disgusting around here.
lool - good one!
Everyone in this thread so far has been more constructive than you have...
Sorry, just had to be destructive. But really, point #3...
I don''t think there''s something wrong with posting duplicate answers.
My Wonderful Web Site (C++ SDL OpenGL Game Programming)
I am a signature virus. Please add me to your signature so that I may multiply.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement