19 references to AwayFromZero
aspire (1)
src\Shared\DurationFormatter.cs (1)
65
var secondaryValue = Math.Round((ticks / secondaryUnit.Ticks) % ofPrevious, MidpointRounding.
AwayFromZero
);
Aspire.Dashboard (2)
Model\Assistant\AIHelpers.cs (1)
116
return (int)Math.Round(duration.TotalMilliseconds, 0, MidpointRounding.
AwayFromZero
);
src\Shared\DurationFormatter.cs (1)
65
var secondaryValue = Math.Round((ticks / secondaryUnit.Ticks) % ofPrevious, MidpointRounding.
AwayFromZero
);
Microsoft.DotNet.XUnitAssert.Tests (4)
EqualityAssertsTests.cs (4)
2034
Assert.Equal(10.565, 10.566, 2, MidpointRounding.
AwayFromZero
);
2194
Assert.Equal(10.5655f, 10.5666f, 2, MidpointRounding.
AwayFromZero
);
4012
var ex = Record.Exception(() => Assert.NotEqual(10.565, 10.566, 2, MidpointRounding.
AwayFromZero
));
4160
var ex = Record.Exception(() => Assert.NotEqual(10.5655f, 10.5666f, 2, MidpointRounding.
AwayFromZero
));
PresentationCore (1)
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
666
return RoundDipForDisplayMode(value, pixelsPerDip, MidpointRounding.
AwayFromZero
);
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
53
case MidpointRounding.
AwayFromZero
:
150
case MidpointRounding.
AwayFromZero
:
252
public static T Invoke(T x) => T.Round(x, MidpointRounding.
AwayFromZero
);
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (1)
2480
else if (mode == MidpointRounding.
AwayFromZero
)
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1364
case MidpointRounding.
AwayFromZero
:
src\libraries\System.Private.CoreLib\src\System\MathF.cs (1)
401
case MidpointRounding.
AwayFromZero
:
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
1701
case MidpointRounding.
AwayFromZero
:
1747
case MidpointRounding.
AwayFromZero
:
System.Windows.Forms (3)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
1003
dataGridViewColumn.DesiredFillWidth = (int)Math.Round(desiredFillWidth, MidpointRounding.
AwayFromZero
);
1158
mostDeservingDataGridViewColumn.DesiredFillWidth = Math.Min(oldDesiredWidth, (int)Math.Round(floatDesiredWidth, MidpointRounding.
AwayFromZero
));
1230
mostDeservingDataGridViewColumn.DesiredFillWidth = Math.Max(mostDeservingDataGridViewColumn.MinimumWidth, (int)Math.Round(floatDesiredWidth, MidpointRounding.
AwayFromZero
));