phaser/v3/src/math/IsEven.js
2017-10-06 04:52:41 +01:00

17 lines
337 B
JavaScript

/**
* [description]
*
* @function Phaser.Math.IsEven
* @since 3.0.0
*
* @param {number} value - [description]
*
* @return {boolean} [description]
*/
var IsEven = function (value)
{
// Use abstract equality == for "is number" test
return (value == parseFloat(value)) ? !(value % 2) : void 0;
};
module.exports = IsEven;