**Next:** This example shows the Floor method being used on doubles that would be rounded down or rounded up with the Math.Round method.

**Info:** In the example, the two numbers 123.456 and 123.987 are rounded down to the nearest integer.

**And:** This means that regardless of how close they are close to 124, they are rounded to 123.

**Note:** Floor can be useful when rounding numbers that are part of a larger representation of another number.

**So:** Using Math.Floor on a negative number will still decrease the total number. This means it will always become smaller.

Home

Dot Net Perls

© 2007-2020 Sam Allen. Every person is special and unique. Send bug reports to info@dotnetperls.com.