On Thu, 03 Sep 2009 16:18:34 +0300 Z3N <1337z3n...@gmail.com> wrote: >I'm have some new question. How to add digits in 16.16, or 26.6 >format??? a>>6+b>>6 - not usefull.
I'm not sure what you want to do. In the calculation "a>>6 + b>>6", what are a and b? Both of a and b are 26.6 fixed point values and you want to obtain the integer result? Here I quote a few macros in include/freetype/internal/ftcalc.h... #define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 ) #define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 ) #define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 ) #define F2DOT14_TO_FIXED( x ) ( (FT_Long)(x) << 2 ) #define FLOAT_TO_FIXED( x ) ( (FT_Long)( x * 65536.0 ) ) #define FIXED_TO_INT( x ) ( FT_RoundFix( x ) >> 16 ) #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ : ( -( ( 32 - (x) ) & -64 ) ) ) Regards, mpsuzuki _______________________________________________ Freetype-devel mailing list Freetype-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-devel