42 #ifdef FT_MULFIX_ASSEMBLER
67 #define FT_COMPONENT calc
72 #define FT_MOVE_SIGN( x, x_unsigned, s ) \
76 x_unsigned = 0U - (x_unsigned); \
89 return (
ADD_LONG(
a, 0x8000L - (
a < 0 ) ) ) & ~0xFFFFL;
98 return (
ADD_LONG(
a, 0xFFFFL ) ) & ~0xFFFFL;
119 if (
z & 0xFFFF0000UL )
124 if (
z & 0x0000FF00UL )
129 if (
z & 0x000000F0UL )
134 if (
z & 0x0000000CUL )
139 if (
z & 0x00000002UL )
178 FT_UInt64
a,
b,
c,
d;
190 d =
c > 0 ? (
a *
b + (
c >> 1 ) ) /
c
207 FT_UInt64
a,
b,
c,
d;
219 d =
c > 0 ?
a *
b /
c
234 #ifdef FT_MULFIX_ASSEMBLER
236 return FT_MULFIX_ASSEMBLER( (FT_Int32)a_, (FT_Int32)b_ );
243 return (
FT_Long)( ( ab + 0x8000L - ( ab < 0 ) ) >> 16 );
266 q =
b > 0 ? ( (
a << 16 ) + (
b >> 1 ) ) /
b
279 ft_multo64( FT_UInt32
x,
283 FT_UInt32 lo1, hi1, lo2, hi2, lo, hi, i1, i2;
286 lo1 =
x & 0x0000FFFFU; hi1 =
x >> 16;
287 lo2 =
y & 0x0000FFFFU; hi2 =
y >> 16;
296 hi += (FT_UInt32)( i1 < i2 ) << 16;
311 ft_div64by32( FT_UInt32 hi,
320 return (FT_UInt32)0x7FFFFFFFL;
328 r = ( hi <<
i ) | ( lo >> ( 32 -
i ) ); lo <<=
i;
336 r = (
r << 1 ) | ( lo >> 31 ); lo <<= 1;
358 hi =
x->hi +
y->hi + ( lo <
x->lo );
436 else if (
a +
b <= 129894UL - (
c >> 17 ) )
437 a = (
a *
b + (
c >> 1 ) ) /
c;
444 ft_multo64(
a,
b, &temp );
449 FT_Add64( &temp, &temp2, &temp );
452 a = ( temp.
hi == 0 ) ? temp.
lo /
c
453 : ft_div64by32( temp.
hi, temp.
lo,
c );
484 else if (
a +
b <= 131071UL )
492 ft_multo64(
a,
b, &temp );
495 a = ( temp.
hi == 0 ) ? temp.
lo /
c
496 : ft_div64by32( temp.
hi, temp.
lo,
c );
511 #ifdef FT_MULFIX_ASSEMBLER
513 return FT_MULFIX_ASSEMBLER( a_, b_ );
546 sa = ( a_ >> (
sizeof ( a_ ) * 8 - 1 ) );
547 a = ( a_ ^ sa ) - sa;
548 sb = ( b_ >> (
sizeof ( b_ ) * 8 - 1 ) );
549 b = ( b_ ^ sb ) - sb;
554 if (
a + (
b >> 8 ) <= 8190UL )
555 a = (
a *
b + 0x8000U ) >> 16;
558 FT_UInt32 al =
a & 0xFFFFUL;
561 a = (
a >> 16 ) *
b + al * (
b >> 16 ) +
562 ( ( al * (
b & 0xFFFFUL ) + 0x8000UL ) >> 16 );
584 if (
a + (
b >> 8 ) <= 8190UL )
585 a = (
a *
b + 0x8000UL ) >> 16;
588 FT_UInt32 al =
a & 0xFFFFUL;
591 a = (
a >> 16 ) *
b + al * (
b >> 16 ) +
592 ( ( al * (
b & 0xFFFFUL ) + 0x8000UL ) >> 16 );
628 else if (
a <= 65535UL - (
b >> 17 ) )
631 q = ( (
a << 16 ) + (
b >> 1 ) ) /
b;
644 FT_Add64( &temp, &temp2, &temp );
645 q = ft_div64by32( temp.
hi, temp.
lo,
b );
694 return FT_THROW( Invalid_Argument );
701 return FT_THROW( Invalid_Argument );
778 for (
i = 0;
i < 4;
i++ )
780 if (
val[
i] > maxval )
782 if (
val[
i] &&
val[
i] < nonzero_minval )
783 nonzero_minval =
val[
i];
787 if ( maxval > 0x7FFFFFFFL )
790 if ( maxval > 23170 )
807 temp2 =
m.xx *
m.xx +
m.xy *
m.xy +
m.yx *
m.yx +
m.yy *
m.yy;
850 FT_UInt32
x,
y,
u,
v,
l;
878 l =
x >
y ?
x + (
y >> 1 )
890 l =
x >
y ?
x + (
y >> 1 )
901 b = 0x10000 - (FT_Int32)
l;
909 u = (FT_UInt32)( x_ + ( x_ *
b >> 16 ) );
910 v = (FT_UInt32)( y_ + ( y_ *
b >> 16 ) );
915 z = -(FT_Int32)(
u *
u +
v *
v ) / 0x200;
916 z =
z * ( ( 0x10000 +
b ) >> 8 ) / 0x10000;
928 l = (FT_UInt32)( 0x10000 + (FT_Int32)(
u *
x +
v *
y ) / 0x10000 );
943 FT_SqrtFixed( FT_Int32
x )
945 FT_UInt32 root, rem_hi, rem_lo, test_div;
954 rem_lo = (FT_UInt32)
x;
958 rem_hi = ( rem_hi << 2 ) | ( rem_lo >> 30 );
961 test_div = ( root << 1 ) + 1;
963 if ( rem_hi >= test_div )
971 return (FT_Int32)root;
990 FT_Int64 delta = SUB_INT64( MUL_INT64( in_x, out_y ),
991 MUL_INT64( in_y, out_x ) );
994 return ( delta > 0 ) - ( delta < 0 );
1021 ft_multo64( (FT_UInt32)in_x, (FT_UInt32)out_y, &z1 );
1022 ft_multo64( (FT_UInt32)in_y, (FT_UInt32)out_x, &z2 );
1024 if ( z1.
hi > z2.
hi )
1026 else if ( z1.
hi < z2.
hi )
1028 else if ( z1.
lo > z2.
lo )
1030 else if ( z1.
lo < z2.
lo )
1051 FT_Pos ax = in_x + out_x;
1052 FT_Pos ay = in_y + out_y;
1054 FT_Pos d_in, d_out, d_hypot;
1084 return ( d_in + d_out - d_hypot ) < ( d_hypot >> 4 );
small capitals from c petite p scientific f u
small capitals from c petite p scientific i
[1]
ft_corner_is_flat(FT_Pos in_x, FT_Pos in_y, FT_Pos out_x, FT_Pos out_y)
FT_MulFix(FT_Long a_, FT_Long b_)
FT_MulDiv(FT_Long a_, FT_Long b_, FT_Long c_)
FT_Vector_NormLen(FT_Vector *vector)
struct FT_Int64_ FT_Int64
FT_Vector_Transform_Scaled(FT_Vector *vector, const FT_Matrix *matrix, FT_Long scaling)
FT_MulDiv_No_Round(FT_Long a_, FT_Long b_, FT_Long c_)
FT_Matrix_Invert(FT_Matrix *matrix)
FT_DivFix(FT_Long a_, FT_Long b_)
#define FT_MOVE_SIGN(x, x_unsigned, s)
FT_Matrix_Multiply_Scaled(const FT_Matrix *a, FT_Matrix *b, FT_Long scaling)
FT_Matrix_Check(const FT_Matrix *matrix)
FT_Hypot(FT_Fixed x, FT_Fixed y)
FT_Matrix_Multiply(const FT_Matrix *a, FT_Matrix *b)
ft_corner_orientation(FT_Pos in_x, FT_Pos in_y, FT_Pos out_x, FT_Pos out_y)
FT_BEGIN_HEADER typedef signed long FT_Pos
FT_Vector_Length(FT_Vector *vec)
FT_BEGIN_HEADER typedef unsigned char FT_Bool
auto it unsigned count const
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLenum GLsizei count
GLdouble GLdouble GLdouble GLdouble q
GLenum GLenum GLenum GLenum GLenum scale