Skip to content

Commit 65e2deb

Browse files
committed
Added Math.isEven and isEvenStrict
1 parent eddb17f commit 65e2deb

4 files changed

Lines changed: 17 additions & 1 deletion

File tree

v3/src/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
var CHECKSUM = {
2-
build: '3742be10-5b7d-11e7-8005-ef6dcee762ca'
2+
build: 'f2d24020-5b86-11e7-923f-e7e69f9cb7f2'
33
};
44
module.exports = CHECKSUM;

v3/src/math/IsEven.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var IsEven = function (value)
2+
{
3+
// Use abstract equality == for "is number" test
4+
return (value == parseFloat(value)) ? !(value % 2) : void 0;
5+
};
6+
7+
module.exports = IsEven;

v3/src/math/IsEvenStrict.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var IsEvenStrict = function (value)
2+
{
3+
// Use strict equality === for "is number" test
4+
return (value === parseFloat(value)) ? !(value % 2) : void 0;
5+
};
6+
7+
module.exports = IsEvenStrict;

v3/src/math/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ module.exports = {
3434
FloatBetween: require('./FloatBetween'),
3535
FloorTo: require('./FloorTo'),
3636
GetSpeed: require('./GetSpeed'),
37+
IsEven: require('./IsEven'),
38+
IsEvenStrict: require('./IsEvenStrict'),
3739
Linear: require('./Linear'),
3840
MaxAdd: require('./MaxAdd'),
3941
MinSub: require('./MinSub'),

0 commit comments

Comments
 (0)