Skip to content

Instantly share code, notes, and snippets.

@jamesmoss
Forked from jaspertandy/cron.php
Created November 18, 2011 14:17
Show Gist options
  • Save jamesmoss/1376560 to your computer and use it in GitHub Desktop.
Save jamesmoss/1376560 to your computer and use it in GitHub Desktop.
function myfloor( $value , $precision = 0 ){
$multiplier = pow(10, $precision);
return floor( $value * $multiplier ) / $multiplier;
}
function myceil( $value , $precision = 0 ){
$multiplier = pow(10, $precision);
return ceil( $value * $multiplier ) / $multiplier;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment