2018-02-12 16:01:20 +00:00
|
|
|
/**
|
|
|
|
* @author Richard Davey <rich@photonstorm.com>
|
2019-01-15 16:20:22 +00:00
|
|
|
* @copyright 2019 Photon Storm Ltd.
|
2019-05-10 15:15:04 +00:00
|
|
|
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
2018-02-12 16:01:20 +00:00
|
|
|
*/
|
|
|
|
|
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;
|