Fixes CdfLibrary.js

This commit is contained in:
Roman Galochkin 2020-02-25 13:13:17 +03:00
parent 4fc7723e32
commit 9349930ad8

View File

@ -130,14 +130,11 @@ const {
function integral({ xs, ys }) {
if (_.includes(ys, NaN)) {
return NaN;
}
else if (_.includes(ys, Infinity) && _.includes(ys, -Infinity)){
} else if (_.includes(ys, Infinity) && _.includes(ys, -Infinity)) {
return NaN;
}
else if (_.includes(ys, Infinity)){
} else if (_.includes(ys, Infinity)) {
return Infinity;
}
else if (_.includes(ys, -Infinity)){
} else if (_.includes(ys, -Infinity)) {
return -Infinity;
}
@ -171,4 +168,3 @@ const {
differentialEntropy,
integral,
};