25 references to ToEven
Microsoft.DotNet.XUnitAssert.Tests (4)
EqualityAssertsTests.cs (4)
2044 var ex = Record.Exception(() => Assert.Equal(0.11113, 0.11115, 4, MidpointRounding.ToEven)); 2204 var ex = Record.Exception(() => Assert.Equal(0.111133f, 0.111155f, 4, MidpointRounding.ToEven)); 4026 Assert.NotEqual(0.11113, 0.11115, 4, MidpointRounding.ToEven); 4174 Assert.NotEqual(0.111133f, 0.111155f, 4, MidpointRounding.ToEven);
PresentationCore (1)
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
643return RoundDipForDisplayMode(value, pixelsPerDip, MidpointRounding.ToEven);
System.Numerics.Tensors (5)
System\Numerics\Tensors\netcore\Tensor.cs (2)
5111TensorOperation.Invoke<TensorOperation.Round<T>, T, Tuple<int, MidpointRounding>, T>(x, Tuple.Create(digits, MidpointRounding.ToEven), destination); 5123TensorOperation.Invoke<TensorOperation.Round<T>, T, Tuple<int, MidpointRounding>, T>(x, Tuple.Create(digits, MidpointRounding.ToEven), in destination);
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
44case MidpointRounding.ToEven: 81Round(x, digits, MidpointRounding.ToEven, destination); 136case MidpointRounding.ToEven:
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
678public static decimal Round(decimal d) => Round(ref d, 0, MidpointRounding.ToEven); 679public static decimal Round(decimal d, int decimals) => Round(ref d, decimals, MidpointRounding.ToEven);
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (2)
1296InternalRound(ref pdecIn, (uint)scale, MidpointRounding.ToEven); 2471else if (mode == MidpointRounding.ToEven)
src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
1364return Round(value, digits, MidpointRounding.ToEven); 1384case MidpointRounding.ToEven:
src\libraries\System.Private.CoreLib\src\System\MathF.cs (2)
391return Round(x, digits, MidpointRounding.ToEven); 411case MidpointRounding.ToEven:
src\libraries\System.Private.CoreLib\src\System\Numerics\IFloatingPoint.cs (4)
44/// <summary>Rounds a value to the nearest integer using the default rounding mode (<see cref="MidpointRounding.ToEven" />).</summary> 47static virtual TSelf Round(TSelf x) => TSelf.Round(x, digits: 0, MidpointRounding.ToEven); 49/// <summary>Rounds a value to a specified number of fractional-digits using the default rounding mode (<see cref="MidpointRounding.ToEven" />).</summary> 53static virtual TSelf Round(TSelf x, int digits) => TSelf.Round(x, digits, MidpointRounding.ToEven);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\ISimdVector_2.cs (1)
688/// <summary>Rounds each element in a vector to the nearest integer using the default rounding mode (<see cref="MidpointRounding.ToEven" />).</summary>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
1708case MidpointRounding.ToEven: 1754case MidpointRounding.ToEven: