Floor Function

   
Floor Function

Class

System.Math

Syntax

 Math.Floor(   d   ) 
d (required; Double)

Return Value

Returns a Double containing the largest integer less than or equal to the argument d

Description

Returns the largest integer less than or equal to the argument d

Example

 Math.Floor(12.9)          ' Returns 12 Math.Floor(-12.1)         ' Returns -13 

Rules at a Glance

  • Because this function can accept numeric values only, you may want to check the value you pass using the IsNumeric function to prevent generating an error.

  • This is a Shared member, so it can be used without creating any objects.

VB.NET/VB 6 Differences

The Floor function is new to the .NET Framework.

See Also

Ceiling Function

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

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