Math.Floor Function in VB.NET
What is the use of math.floor() mathematical function in VB.NET
Explanation
Math.Floor Mathematical Function
Math.Floor() Mathematical Function in VB.net 2008 is used to return largest integer less than or equal to the
specified number.
Syntax:
Math.Floor(Number)
In the above syntax
Number specifies the number to find the floor value.
Example:
Module Module1
Sub Main()
Console.WriteLine("Floor value of 1.23 is:
" & Math.Floor(1.23))
Console.WriteLine("Floor value of 1.99 is:
" & Math.Floor(1.99))
Console.WriteLine("Floor value of 2 is:
" & Math.Floor(2))
Console.ReadLine()
End Sub
End Module
Result:
Floor value of 1.23 is: 1
Floor value of 1.99 is: 1
Floor value of 2 is: 2
In the above example all decimals have the floor values that are the
largest integer lesser than the given number. But '2' has the floor value equal to '2'.