Fix beta distribution when v < w and min, max != 0, 1.

This commit is contained in:
Sam Gross
2013-07-29 14:41:24 -04:00
parent 5b4f884d9b
commit b228f65d1d
+1 -1
View File
@@ -29,7 +29,7 @@
exports.beta = function (v, w, min, max) {
if (v < w) {
return max - (max - min) * _this.beta(w, v, min, max);
return max - (max - min) * _this.beta(w, v, 0, 1);
}
var y1 = _this.gamma(0, 1, v),
y2 = _this.gamma(0, 1, w);