- From: Masayuki Nakano <masayuki@d-toybox.com>
- Date: Mon, 19 Mar 2012 13:57:52 +0900
- To: Glenn Maynard <glenn@zewt.org>
- CC: "www-dom@w3.org" <www-dom@w3.org>
On 2012/03/18 11:45, Glenn Maynard wrote: > On Sat, Mar 17, 2012 at 8:57 PM, Masayuki Nakano <masayuki@d-toybox.com > <mailto:masayuki@d-toybox.com>> wrote: > > E.g., following function returns false when I defined them as float. > > function () { > var event = new WheelEvent("wheel", { deltaX: 1.0 }); > return (event.deltaX == 1.0); > } > > because the deltaX becomes 1.000000xxxxxxxxx (x means random number) > by the error. > > > (I'd expect this to happen with 0.1, but 1.0 is exactly representable by > both floats and doubles...) I'm sorry, it's just my mistake. You're right. -- Masayuki Nakano <masayuki@d-toybox.com> Manager, Internationalization, Mozilla Japan.
Received on Monday, 19 March 2012 04:58:23 UTC