練炭ブログ

萌え壁紙、Irvine、DMonkey、Proxomitron などの情報を扱ってます。

DMonkey: Math.abs(無限大)が0になる不具合

コメントなし»
alert (Math.abs (Number.POSITIVE_INFINITY));  // 0
alert (Math.abs (Number.NEGATIVE_INFINITY));  // 0

この 0 は整数型の 0 です。浮動小数点型の 0.0 ではありません。