/*************************************************************************/ /* */ /*
*/ /* computations */ /* */ /* */ /* Computations */ /* */ /* */ /* */ /* Crunching fixed numbers and vectors. */ /* */ /* */ /* */ /* This section contains various functions used to perform */ /* computations on 16.16 fixed-float numbers or 2d vectors. */ /* */ /* */ /* */ /* FT_MulDiv */ /* FT_MulFix */ /* FT_DivFix */ /* FT_RoundFix */ /* FT_CeilFix */ /* FT_FloorFix */ /* FT_Vector_Transform */ /* FT_Matrix_Multiply */ /* FT_Matrix_Invert */ /* */ /* */ /*************************************************************************/ /*************************************************************************/ /* */ /* */ /* FT_MulDiv */ /* */ /* */ /* Compute `(a*b)/c' with maximum accuracy, using a 64-bit */ /* intermediate integer whenever necessary. */ /* */ /* This function isn't necessarily as fast as some processor specific */ /* operations, but is at least completely portable. */ /* */ /* */ /* */ /* a :: The first multiplier. */ /* */ /* b :: The second multiplier. */ /* */ /* c :: The divisor. */ /* */ /* */ /* */ /* The result of `(a*b)/c'. This function never traps when trying to */ /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ /* on the signs of `a' and `b'. */ /* */ /* */ /* */ FT_EXPORT( FT_Long ) FT_MulDiv( FT_Long a, FT_Long b, FT_Long c ); /* More functions here */ /*************************************************************************/ /* */ /* */ /* FT_Vector_Transform */ /* */ /* */ /* Transform a single vector through a 2x2 matrix. */ /* */ /* */ /* */ /* vector :: The target vector to transform. */ /* */ /* */ /* */ /* matrix :: A pointer to the source 2x2 matrix. */ /* */ /* */ /* */ /* The result is undefined if either `vector' or `matrix' is invalid. */ /* */ /* */ /*
*/ /* */ FT_EXPORT( void ) FT_Vector_Transform( FT_Vector* vec, const FT_Matrix* matrix );