Mod / divisible nums..
Mod / divisible nums..
- Started
- Last post
- 0 Responses
- morphinelips
I have an auction program that has a minimum increment, which could be something like 0.1. I want to know whether a bid of 45.5 or a bid of 45.55 is valid, and evenly divides into my minimum increment. I thought this would be a simple mod calculation, but mod dosn't work for non integers.
I have an alternate solution, and this doesn't work either:$mod = is_int(45 / .1);
echo " -- $mod">--
$mod = is_int(45 / 1);
echo " -- $mod">-- 1
Baaaaah!! The first one should return one as well..
Anyone know a solution to this problem?