FDK/Tools/Programs/public/lib/source/cffwrite/cffwrite_t2cstr.c
/* This function converts a real number to a fixed point number. However, the
   precision of the conversion is restricted to 2 decimal digits of fraction.
   This permits round-tripping of fractional numbers in Type 1 charstrings 
   that were implemented by division by 10 or 100. */
This function converts a real number to a fixed point number. However, the
precision of the conversion is restricted to 2 decimal digits of fraction.
This permits round-tripping of fractional numbers in Type 1 charstrings
that were implemented by division by 10 or 100.
This function converts a real number to a fixed point number . However the precision of the conversion is restricted to 2 decimal digits of fraction . This permits round - tripping of fractional numbers in Type 1 charstrings that were implemented by division by 10 or 100 .
static Fixed float2Fixed(float r)
	{
	float half = (r < 0)? -0.5f: 0.5f;
	Fixed x = (Fixed)(r*100 + half);
	return (x/100)*65536 + (Fixed)((x%100)*655.36f + half);
	}
static Fixed float2Fixed ( float r ) { float half = ( r < 0 ) ? -0.5f : 0.5f ; Fixed x = ( Fixed ) ( r * 100 + half ) ; return ( x / 100 ) * 65536 + ( Fixed ) ( ( x % 100 ) * 655.36f + half ) ; }
This function converts a real number to a fixed point number.
This function converts a real number to a fixed point number .