mirror of
https://github.com/photonstorm/phaser
synced 2025-01-11 20:58:56 +00:00
12 lines
236 B
JavaScript
12 lines
236 B
JavaScript
|
var CeilTo = function (value, place, base)
|
||
|
{
|
||
|
if (place === undefined) { place = 0; }
|
||
|
if (base === undefined) { base = 10; }
|
||
|
|
||
|
var p = Math.pow(base, -place);
|
||
|
|
||
|
return Math.ceil(value * p) / p;
|
||
|
};
|
||
|
|
||
|
module.exports = CeilTo;
|