Skip to content

Commit

Permalink
keep two decimlas
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoreras committed Oct 31, 2023
1 parent 1b32ad1 commit d896d91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ const generateProbabilityDensityData = (
// Loop through the x values from 0 to 1.
for (let i = 0; i <= 1; i += step) {
// Set the x value to the current value of i.
const x = Number(i.toFixed(3));
const x = Number(i.toFixed(2));
// Set the y value to the value of the pdf at the current value of i.
const y = Number(betaDist.pdf(x).toFixed(3));
const y = Number(betaDist.pdf(x).toFixed(2));

if (!isFinite(y)) {
continue;
Expand Down

0 comments on commit d896d91

Please sign in to comment.