Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Commit

Permalink
set precision
Browse files Browse the repository at this point in the history
Signed-off-by: Dev <[email protected]>
  • Loading branch information
Dev committed May 25, 2020
1 parent 64712c5 commit 07b59d5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ module.exports.process = async (data) => {
}
console.log(`airflow ${ag.airflowRemovedCount / ag.particleCreatedCount}`)
console.log(`intakes ${ag.intakes.toString()}`)
const dummy = false;
const dummy = true;
let rval;
if (dummy){
const pb = Math.random()*.3;
const pb = (Math.random()*.3).toPrecision(2);
rval = {
success: true,
data: {
prob: Math.random()*.3,
nearPasses: pb*1.3 + Math.random()*.05,
airflow: Math.random()
prob: (Math.random()*.3).toPrecision(2),
nearPasses: (pb*1.3 + Math.random()*.05).toPrecision(2),
airflow: (Math.random()).toPrecision(2)
}
}
} else {
Expand Down

0 comments on commit 07b59d5

Please sign in to comment.