gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-commit] gnash ChangeLog libbase/utility.h server/charac...


From: Rob Savoye
Subject: Re: [Gnash-commit] gnash ChangeLog libbase/utility.h server/charac...
Date: Fri, 13 Jun 2008 09:33:09 -0600
User-agent: Thunderbird 2.0.0.14 (X11/20080501)

Benjamin Wolsey wrote:

All of these rely on undefined behaviour. Conversion from float to an
integer is undefined behaviour if the float value cannot be represented
in the integral value after truncation (i.e. when the fractional value
has been removed).

Also you can't convert a double this way, as a double is 8 bytes, and on many systems an int is only 4 bytes still. The only way I know to really convert it is to separate the integer value and the fractional values and then round one way or the other.

        - rob -




reply via email to

[Prev in Thread] Current Thread [Next in Thread]