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)
643
return RoundDipForDisplayMode(value, pixelsPerDip, MidpointRounding.
ToEven
);
System.Numerics.Tensors (5)
System\Numerics\Tensors\netcore\Tensor.cs (2)
5111
TensorOperation.Invoke<TensorOperation.Round<T>, T, Tuple<int, MidpointRounding>, T>(x, Tuple.Create(digits, MidpointRounding.
ToEven
), destination);
5123
TensorOperation.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)
44
case MidpointRounding.
ToEven
:
81
Round(x, digits, MidpointRounding.
ToEven
, destination);
136
case MidpointRounding.
ToEven
:
System.Private.CoreLib (15)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
678
public static decimal Round(decimal d) => Round(ref d, 0, MidpointRounding.
ToEven
);
679
public static decimal Round(decimal d, int decimals) => Round(ref d, decimals, MidpointRounding.
ToEven
);
src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (2)
1296
InternalRound(ref pdecIn, (uint)scale, MidpointRounding.
ToEven
);
2471
else if (mode == MidpointRounding.
ToEven
)
src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
1364
return Round(value, digits, MidpointRounding.
ToEven
);
1384
case MidpointRounding.
ToEven
:
src\libraries\System.Private.CoreLib\src\System\MathF.cs (2)
391
return Round(x, digits, MidpointRounding.
ToEven
);
411
case 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>
47
static 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>
53
static 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)
1708
case MidpointRounding.
ToEven
:
1754
case MidpointRounding.
ToEven
: