W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2012

Re: [DOM3 Events] Error between float vs. double of WheelEvent

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 18 Mar 2012 21:06:39 -0400
Message-ID: <4F66869F.4000000@mit.edu>
To: www-dom@w3.org
On 3/17/12 9:57 PM, Masayuki Nakano 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.

The actual testcase in the bug has 0.1, not 1.0, so the behavior is 
"expected", sorta....

-Boris
Received on Monday, 19 March 2012 01:07:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:09 GMT