is it possible to use the round proc to always round a number down, for example 8.# even if # is 5 or more?
If there isn't, is there a way to "Integer divide", wich is to divide with a remainder, but NOT use the remainder, like the oposite of %?
ex:
if(src.gold\4==0)
^
// This is the oposite to
// normal divide, which is /
// This tecnique was from vb6
// But it did not work here
i am trying to see if the var is divisible by four evenly.
ID:164204
Jul 8 2007, 11:56 am (Edited on Jul 8 2007, 12:02 pm)
|
|
Uhh if you want to see if something is evenly divisible by another number you use % and check if it has no remainder and if it doesn't it is evenly divisible.
Anyway if you want to round a number always down simply use round and don't pass a second parameter. This returns the floor of the number which for positive values is the same as truncating the decimal portion however with negative numbers it always rounds down like you want however this isn't the same as an integer divide as the floor of say -1.1 is -2 not -1.