Horje
Difference between Math.Floor() and Math.Truncate() Code Example
Difference between Math.Floor() and Math.Truncate()
// Math.Floor rounds down
// Math.Ceiling rounds up
// Math.Truncate rounds towards zero

Round(1.5) = 2
Round(2.5) = 2
Round(1.5, MidpointRounding.AwayFromZero) = 2
Round(2.5, MidpointRounding.AwayFromZero) = 3
Round(1.55, 1) = 1.6
Round(1.65, 1) = 1.6
Round(1.55, 1, MidpointRounding.AwayFromZero) = 1.6
Round(1.65, 1, MidpointRounding.AwayFromZero) = 1.7

Truncate(2.10) = 2
Truncate(2.00) = 2
Truncate(1.90) = 1
Truncate(1.80) = 1




Csharp

Related
vb.net array search Code Example vb.net array search Code Example
c#  OnMouseUp unity Code Example c# OnMouseUp unity Code Example
show title combox check box wpf Code Example show title combox check box wpf Code Example
c# open config file by path Code Example c# open config file by path Code Example
ENUM error codes all Code Example ENUM error codes all Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9