Commit cc34edd0 authored by Marc Duez's avatar Marc Duez
Browse files

model.js : added some magic to avoid javascript approximation

- javascript can be funny sometimes ( 0.1 + 0.2 = 0.3000000000004 )
parent 82b8efb6
......@@ -1312,7 +1312,8 @@ Model.prototype = {
result=(100*size).toFixed(3)+"%";
}
}else{
result=(100*size)+"%";
//hack to avoid approximation due to javascript way to handle Number
result=parseFloat((100*size).toFixed(10))+"%";
}
break;
case "scientific" :
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment