[PATCH 1/2]vbscript: Implemented builtin function CInt(try 3)

Henri Verbeet hverbeet at gmail.com
Fri Apr 26 05:02:08 CDT 2013


On 26 April 2013 10:27, Jacek Caban <jacek at codeweavers.com> wrote:
> - round is not portable. As I mentioned you before, Wine needs to be C89
> compatible. If we need some features that are not part of C89, we need
> to be careful about that and it often requires things like configure
> checks. In case of round, replacing it with floor(x+0.5) does the trick
> pretty well.
>
But that's going to do something different for negative values.

What you actually want to use is probably lrint(), although that's C99
as well, and affected by the current rounding mode. The latter may be
what you want anyway, but would need tests.



More information about the wine-devel mailing list