Skip to content

Stable Release

Compare
Choose a tag to compare
@jaggedsoft jaggedsoft released this 07 Sep 08:08
· 204 commits to master since this release
9752109

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);
}