Important: The information in this document is obsolete and should not be used for new development.
FixRound
You can use theFixRoundfunction to round a fixed-point number to the nearest integer.
FUNCTION FixRound (x: Fixed): Integer;
x- The
Fixednumber to be rounded.DESCRIPTION
TheFixRoundfunction returns theIntegernumber nearest theFixednumber you supply in thexparameter. If the value is halfway between two integers (0.5), it is rounded up. Thus, 4.5 is rounded to 5, and -3.5 is rounded to -3.To round a negative
Fixednumber so that values halfway between two integers are rounded to the number with the higher absolute value, negate the number, round it, and then negate it again.