MathUtils::toInt()

Edwin Smith edwsmith at adobe.com
Tue Jun 10 12:17:03 PDT 2008


It implements the ECMA "ToInteger()" semantics which return IEEE doubles
without the fractional part.  Not to be confused with ECMA ToInt32().

Ed

> -----Original Message-----
> From: tamarin-devel-bounces at mozilla.org [mailto:tamarin-devel-
> bounces at mozilla.org] On Behalf Of Michael Daumling
> Sent: Tuesday, June 10, 2008 9:48 AM
> To: tamarin-devel at mozilla.org
> Subject: MathUtils::toInt()
> 
> Hi all,
> 
> Is there any good reason why MathUtils::toInt() returns a double?
> 
> Date routines use the value from above method as double, but
StringClass
> converts the result back to an integer, which I think is an
unnecessary
> double->int conversion. Rather have the Date routines convert en
integer
> result into a double, I'd say, where the performance hit is not as
> bad...
> 
> Michael
> 
> _______________________________________________
> Tamarin-devel mailing list
> Tamarin-devel at mozilla.org
> https://mail.mozilla.org/listinfo/tamarin-devel


More information about the Tamarin-devel mailing list