The number to be processed. Uses one of the following data types: Double, Single, Decimal, Integer, Long, Short, or Object. If Object is used, the value must evaluate to a number. The return data type always matches the data type of number.
Description
The Fix function returns the integer portion of a number, with any fractional part truncated.
Usage at a Glance
Fix truncates numbers; it does not round. For example, Fix(100.9) returns 100.
Even for negative source values, Fix simply truncates the fractional portion. For example, Fix(-10.9) returns -10.
A source of Nothing returns Nothing.
The Int and Fix functions work identically with positive numbers. However, for negative numbers, Fix returns the first negative integer greater than the source value, while Int returns the first negative integer less than that value. For example, Fix(-10.1) returns -10, while Int(-10.1) returns -11.