Statement on glibc/iconv Vulnerability

Voting

: one plus three?
(Example: nine)

The Note You're Voting On

josoort at home dot nl
9 years ago
You can simply make a floor with decimals function by using the round() function and subtract 0.05 to the value if the value must have 1 decimal accuracy, or 0.005 for 2 decimals accuracy, or 0.0005 for 3 decimals etc.

Example :

function floorDec($input, $decimals)
{
return round($input - (5 / pow(10, $decimals + 1)), $decimals);
}

<< Back to user notes page

To Top