00844 {
00845 FT_Long result;
00846
00847
00848
00849 if ( in_y == 0 )
00850 {
00851 if ( in_x >= 0 )
00852 result = out_y;
00853 else
00854 result = -out_y;
00855 }
00856 else if ( in_x == 0 )
00857 {
00858 if ( in_y >= 0 )
00859 result = -out_x;
00860 else
00861 result = out_x;
00862 }
00863 else if ( out_y == 0 )
00864 {
00865 if ( out_x >= 0 )
00866 result = in_y;
00867 else
00868 result = -in_y;
00869 }
00870 else if ( out_x == 0 )
00871 {
00872 if ( out_y >= 0 )
00873 result = -in_x;
00874 else
00875 result = in_x;
00876 }
00877 else
00878 {
00879 #ifdef FT_LONG64
00880
00881 FT_Int64 delta = (FT_Int64)in_x * out_y - (FT_Int64)in_y * out_x;
00882
00883
00884 if ( delta == 0 )
00885 result = 0;
00886 else
00887 result = 1 - 2 * ( delta < 0 );
00888
00889 #else
00890
00891 FT_Int64 z1, z2;
00892
00893
00894
00895 ft_multo64( (FT_Int32)in_x, (FT_Int32)out_y, &z1 );
00896 ft_multo64( (FT_Int32)in_y, (FT_Int32)out_x, &z2 );
00897
00898 if ( z1.hi > z2.hi )
00899 result = +1;
00900 else if ( z1.hi < z2.hi )
00901 result = -1;
00902 else if ( z1.lo > z2.lo )
00903 result = +1;
00904 else if ( z1.lo < z2.lo )
00905 result = -1;
00906 else
00907 result = 0;
00908
00909 #endif
00910 }
00911
00912
00913 return (FT_Int)result;
00914 }