projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
60e798c5fda58df28f8d146849336afa4b78770a
[platform/framework/web/crosswalk-tizen.git]
/
1
'use strict';
2
3
var sign = require('../math/sign')
4
5
, abs = Math.abs, floor = Math.floor;
6
7
module.exports = function (value) {
8
if (isNaN(value)) return 0;
9
value = Number(value);
10
if ((value === 0) || !isFinite(value)) return value;
11
return sign(value) * floor(abs(value));
12
};