100 分の 1 に丸められた適切な数値を取得できないようです (つまり、12.57000000008 ではなく 12.57)。
var example = {
user : "John",
dollars: 12.57
};
setInterval( function() {
example.dollars += (parseInt(Math.floor(Math.random()*2000 + 500)) / 100);
console.log(example.dollars);
}, 1000);
次のような値を取得し続けます:
15.20000000008
88.54000000007
86.36000000008
Math 関数で何か間違った設定をしていますか?
注: これは node.js にあります