Travis build: 2163 [cron]
This commit is contained in:
@ -1,2 +1,2 @@
|
||||
const degreesToRads = deg => deg * Math.PI / 180.0;
|
||||
const degreesToRads = deg => (deg * Math.PI) / 180.0;
|
||||
module.exports = degreesToRads;
|
||||
@ -4,6 +4,6 @@ num === 0 || num === 24
|
||||
: num === 12
|
||||
? 12 + 'pm'
|
||||
: num < 12
|
||||
? num % 12 + 'am'
|
||||
: num % 12 + 'pm';
|
||||
? (num % 12) + 'am'
|
||||
: (num % 12) + 'pm';
|
||||
module.exports = getMeridiemSuffixOfInteger;
|
||||
@ -1,6 +1,6 @@
|
||||
const hz = (fn, iterations = 100) => {
|
||||
const before = performance.now();
|
||||
for (let i = 0; i < iterations; i++) fn();
|
||||
return 1000 * iterations / (performance.now() - before);
|
||||
return (1000 * iterations) / (performance.now() - before);
|
||||
};
|
||||
module.exports = hz;
|
||||
@ -1,6 +1,6 @@
|
||||
const lcm = (...arr) => {
|
||||
const gcd = (x, y) => (!y ? x : gcd(y, x % y));
|
||||
const _lcm = (x, y) => x * y / gcd(x, y);
|
||||
const _lcm = (x, y) => (x * y) / gcd(x, y);
|
||||
return [...arr].reduce((a, b) => _lcm(a, b));
|
||||
};
|
||||
module.exports = lcm;
|
||||
@ -4,7 +4,7 @@ let arr = (num + '')
|
||||
.reverse()
|
||||
.map(x => parseInt(x));
|
||||
let lastDigit = arr.splice(0, 1)[0];
|
||||
let sum = arr.reduce((acc, val, i) => (i % 2 !== 0 ? acc + val : acc + (val * 2) % 9 || 9), 0);
|
||||
let sum = arr.reduce((acc, val, i) => (i % 2 !== 0 ? acc + val : acc + ((val * 2) % 9) || 9), 0);
|
||||
sum += lastDigit;
|
||||
return sum % 10 === 0;
|
||||
};
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
const percentile = (arr, val) =>
|
||||
100 * arr.reduce((acc, v) => acc + (v < val ? 1 : 0) + (v === val ? 0.5 : 0), 0) / arr.length;
|
||||
(100 * arr.reduce((acc, v) => acc + (v < val ? 1 : 0) + (v === val ? 0.5 : 0), 0)) / arr.length;
|
||||
module.exports = percentile;
|
||||
@ -1,2 +1,2 @@
|
||||
const radsToDegrees = rad => rad * 180.0 / Math.PI;
|
||||
const radsToDegrees = rad => (rad * 180.0) / Math.PI;
|
||||
module.exports = radsToDegrees;
|
||||
2810
test/testlog
2810
test/testlog
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user