Floor Function


Floor Function

Class

System.Math

Syntax

     Math.Floor(d) 


d (required; Double)

Any valid number

Description

The Floor function returns the largest integer less than or equal to the argument d.

Example

     MsgBox(Math.Floor(12.9))       ' Displays 12     MsgBox(Math.Floor(-12.1))      ' Displays -13 

Usage at a Glance

This is a shared member of the System.Math class, so it can be used without an instance.

Version Differences

The Floor function did not exist in VB 6.

See Also

Ceiling Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net