Inside Macintosh: QuickDraw GX Environment and Utilities / Chapter 8 - QuickDraw GX Mathematics / QuickDraw GX Mathematics ReferenceNumber-Conversion Macros / Rounding, Truncating, and Square Root Operations
FixedRound You can use the FixedRound macro to round a Fixed number to its nearest integer. #define FixedRound(a) ((short) ((Fixed)(a) + fixed1/2 >> 16)) a The number to be rounded. macro result The closest integer to the Fixed number.
FixedRound
Fixed
#define FixedRound(a) ((short) ((Fixed)(a) + fixed1/2 >> 16))
a
Fixed number.