Stable Release
add roundStep function to help with stepSize $quantity = roundStep($quantity, $stepSize);
function roundStep($value, $stepSize = 0.1) {
$precision = strlen(substr(strrchr(rtrim($value,'0'), '.'), 1));
return round((($value / $stepSize) | 0) * $stepSize, $precision);
}