2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
|
|
|
* @copyright 2018 Photon Storm Ltd.
|
|
|
|
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
|
|
|
*/
|
|
|
|
|
2017-10-13 13:11:54 +00:00
|
|
|
/**
|
2018-06-21 17:42:40 +00:00
|
|
|
* Apply `Math.ceil()` to each coordinate of the given Point.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
|
|
|
* @function Phaser.Geom.Point.Floor
|
|
|
|
* @since 3.0.0
|
|
|
|
*
|
2018-03-27 13:27:08 +00:00
|
|
|
* @generic {Phaser.Geom.Point} O - [point,$return]
|
|
|
|
*
|
2018-06-21 17:42:40 +00:00
|
|
|
* @param {Phaser.Geom.Point} point - The Point to floor.
|
2017-10-13 13:11:54 +00:00
|
|
|
*
|
2018-06-21 17:42:40 +00:00
|
|
|
* @return {Phaser.Geom.Point} The Point with `Math.floor()` applied to its coordinates.
|
2017-10-13 13:11:54 +00:00
|
|
|
*/
|
2017-01-03 22:21:47 +00:00
|
|
|
var Floor = function (point)
|
|
|
|
{
|
|
|
|
return point.setTo(Math.floor(point.x), Math.floor(point.y));
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = Floor;
|