Skip to content

Commit

Permalink
round fct
Browse files Browse the repository at this point in the history
  • Loading branch information
foxthefox authored Mar 17, 2017
1 parent 4311701 commit 34d4ab9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jeelink.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ function getConfigObjects(Obj, where, what){
}
function round(value, digits) //digits 1 for 1 digit after comma
{
factor = Math.pow(10, digits);
x = Math.round(value*factor);
return x/factor;
var factor = Math.pow(10, digits);
value = Math.round(value*factor);
return value/factor;
}


Expand Down

0 comments on commit 34d4ab9

Please sign in to comment.