W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2007

[whatwg] Canvas Zero/NaN/Infinity issues

From: Darin Adler <darin@apple.com>
Date: Wed, 16 May 2007 11:22:15 -0700
Message-ID: <51C8DC1C-8CA9-46B9-9DF2-7D8F5536736B@apple.com>
On May 16, 2007, at 11:17 AM, Philip Taylor wrote:

> Existing implementations seem to try converting the value into a JS  
> number, which will always give a floating-point value, and that's  
> just NaN if the conversion is not possible (e.g. from an object, or  
> undefined, or a string that can't be parsed as a number). In that  
> case, there aren't really non-floating point values at all - there  
> are just values that get numberised into NaN before being passed to  
> the canvas API and are then handled by case 1.

Sounds great. If we can be clear that passing values to these  
properties and functions does a numeric conversion that turns such  
things into NaN, then all is well. I don't know where that rule  
should be stated.

     -- Darin
Received on Wednesday, 16 May 2007 11:22:15 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:55 UTC