We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f69405a commit a68479bCopy full SHA for a68479b
PSKoans/Koans/Introduction/AboutNumbers.Koans.ps1
@@ -61,6 +61,13 @@ Describe 'Basic Number Types' {
61
Describe "Banker's Rounding" {
62
63
It 'rounds to nearest even number on .5' {
64
+ <#
65
+ The rounding used in PowerShell is called "Rounding to Even" or "Banker's Rounding".
66
+ Numbers will be rounded to the nearest _even_ Integer.
67
+
68
+ This behaviour stems from the underlying library method [math]::Round() which is documented in more detail here:
69
+ https://docs.microsoft.com/en-us/dotnet/api/system.math.round#midpoint-values-and-rounding-conventions
70
+ #>
71
72
# Try and guess how PowerShell will round these numbers
73
____ | Should -Be ([int]2.5)
0 commit comments