Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 840 of file ftcalc.c.
{ FT_Long result; /* avoid overflow on 16-bit system */ /* deal with the trivial cases quickly */ if ( in_y == 0 ) { if ( in_x >= 0 ) result = out_y; else result = -out_y; } else if ( in_x == 0 ) { if ( in_y >= 0 ) result = -out_x; else result = out_x; } else if ( out_y == 0 ) { if ( out_x >= 0 ) result = in_y; else result = -in_y; } else if ( out_x == 0 ) { if ( out_y >= 0 ) result = -in_x; else result = in_x; } else /* general case */ { #ifdef FT_LONG64 FT_Int64 delta = (FT_Int64)in_x * out_y - (FT_Int64)in_y * out_x; if ( delta == 0 ) result = 0; else result = 1 - 2 * ( delta < 0 ); #else FT_Int64 z1, z2; /* XXX: this function does not allow 64-bit arguments */ ft_multo64( (FT_Int32)in_x, (FT_Int32)out_y, &z1 ); ft_multo64( (FT_Int32)in_y, (FT_Int32)out_x, &z2 ); if ( z1.hi > z2.hi ) result = +1; else if ( z1.hi < z2.hi ) result = -1; else if ( z1.lo > z2.lo ) result = +1; else if ( z1.lo < z2.lo ) result = -1; else result = 0; #endif } /* XXX: only the sign of return value, +1/0/-1 must be used */ return (FT_Int)result; }