main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
284 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var ceil = Math.ceil;
|
---|
3 | var floor = Math.floor;
|
---|
4 |
|
---|
5 | // `Math.trunc` method
|
---|
6 | // https://tc39.es/ecma262/#sec-math.trunc
|
---|
7 | // eslint-disable-next-line es/no-math-trunc -- safe
|
---|
8 | module.exports = Math.trunc || function trunc(x) {
|
---|
9 | var n = +x;
|
---|
10 | return (n > 0 ? floor : ceil)(n);
|
---|
11 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.