Math.Floor Method

Returns the largest integer number that is less than or equal to a value.

...Math.Floor (value)

Prerequisites

None

Parameters

value

A required expression that evaluates to any numerical data type, e.g. Integer, Single, Double.

Remarks

Returns the largest integer number that is less than or equal to the value. This is sometimes referred to as rounding towards negative infinity.

Examples

Dim smaller As Single
smaller = Math.Floor(10.9999) ' Sets smaller equal to 10
smaller = Math.Floor(11) ' Sets smaller equal to 11
smaller = Math.Floor(11.0001) ' Sets smaller equal to 11

See Also

Math Class