luoyi a écrit :
sorry, but:

#define CEIL( x )   ( ( (x) + 63 ) >> 6 )

obviously doesn't do what the C language "ceil()" function do....

if x is a fixed-point 26.6 number, the macro returns the smallest integer that is greater
or equal to it, so it's very comparable to ceil()

ex:

  x=240 corresponds to value 3.75 CEIL(240) => 4
  x=64   corresponds to value 1.0  CEIL(64) => 1
  x=32  corresponds to value 0.5   CEIL(32) => 1
  x =1   corresponds to value 0.015625   CEIL(1) => 1
  x = 0  corresponds to value 0.  CEIL(0) => 0
  x = -1 corresponds to value -0.015625   CEIL(-1) => 0
  x = -32 corresponds to value -0.5  CEIL(-32) => 0
  x = -64 corresponds to value -1.  CEIL(-64) => -1

etc...

Regards,

- David Turner
- The FreeType Project  (www.freetype.org)


"Peter Montgomery" <[EMAIL PROTECTED]> ??????:[EMAIL PROTECTED]
luoyi,

Looks like the fixed point (26.6) version of the C language "ceil( )" function. Here's a page if you're not familiar with it.

http://www.cplusplus.com/ref/cmath/ceil.html






_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype



***********************************************************************************
Information contained in this email message is confidential and may be 
privileged, and is intended only for use of the individual or entity named 
above. If the reader of this message is not the intended recipient, or the 
employee or agent responsible to deliver it to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the [EMAIL PROTECTED] and destroy the 
original message.
***********************************************************************************


_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to