phaser/src/geom/point/Floor.js

25 lines
566 B
JavaScript
Raw Normal View History

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
/**
* [description]
*
* @function Phaser.Geom.Point.Floor
* @since 3.0.0
*
2018-03-27 13:27:08 +00:00
* @generic {Phaser.Geom.Point} O - [point,$return]
*
2017-10-13 13:11:54 +00:00
* @param {Phaser.Geom.Point} point - [description]
*
* @return {Phaser.Geom.Point} [description]
*/
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;