web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
450 B

  1. 'use strict';
  2. var abs = require('./abs');
  3. var floor = require('./floor');
  4. var $isNaN = require('../helpers/isNaN');
  5. var $isFinite = require('../helpers/isFinite');
  6. // https://ecma-international.org/ecma-262/6.0/#sec-isinteger
  7. module.exports = function IsInteger(argument) {
  8. if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
  9. return false;
  10. }
  11. var absValue = abs(argument);
  12. return floor(absValue) === absValue;
  13. };