[PATCH:xmag] Use lrint() from math library if available
cloos at jhcloos.com
Thu Dec 22 11:03:22 PST 2011
>>>>> "AC" == Alan Coopersmith <alan.coopersmith at oracle.com> writes:
>> Should the call to floor(3) when lrint(3) is unavailable include a cast?
AC> There's already casts at the call sites, though not always at the exact
AC> same place:
AC>> scale.table.x[(int) x] = (Position) myrint(sw->scale.scale_x * x);
AC> (so they're now casting long int to short int, instead of double to short int).
I was thinking of the non-lrint(3) case; floor(3) returns a double, so
(Position)floor(...) should give the same error, yes?
James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the xorg-devel