I can't figure out why this simple math does not work. Maybe something about PHP and numbers I am not getting?
$step=1.0;
$step+=0.1;
$substep=$step-(int)$step;
echo gettype($substep);
echo $substep;
if ($substep==0.1) {
echo "should be here";
} else {
echo "but I end up here";
}
OUTPUT: double0.1but I end up here