30 references to ToEven
PresentationCore (1)
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
643return RoundDipForDisplayMode(value, pixelsPerDip, MidpointRounding.ToEven);
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\Tensor.cs (2)
4806TensorOperation.Invoke<TensorOperation.Round<T>, T, Tuple<int, MidpointRounding>, T>(x, Tuple.Create(digits, MidpointRounding.ToEven), destination); 4818TensorOperation.Invoke<TensorOperation.Round<T>, T, Tuple<int, MidpointRounding>, T>(x, Tuple.Create(digits, MidpointRounding.ToEven), in destination);
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (2)
49case MidpointRounding.ToEven: 91Round(x, digits, MidpointRounding.ToEven, destination);
System.Private.CoreLib (25)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
673public static decimal Round(decimal d) => Round(ref d, 0, MidpointRounding.ToEven); 674public static decimal Round(decimal d, int decimals) => Round(ref d, decimals, MidpointRounding.ToEven);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.DecCalc.cs (2)
1306InternalRound(ref pdecIn, (uint)scale, MidpointRounding.ToEven); 2474else if (mode == MidpointRounding.ToEven)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Math.cs (2)
1365return Round(value, digits, MidpointRounding.ToEven); 1385case MidpointRounding.ToEven:
src\runtime\src\libraries\System.Private.CoreLib\src\System\MathF.cs (2)
389return Round(x, digits, MidpointRounding.ToEven); 409case MidpointRounding.ToEven:
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.DecimalIeee754.cs (1)
2005MidpointRounding.ToEven => (discardedComparedToHalf > 0) || ((discardedComparedToHalf == 0) && !TValue.IsZero(quotient & TValue.One)),
src\runtime\src\libraries\System.Private.CoreLib\src\System\Number.Rounding.cs (3)
79TNumber rn = TNumber.Round(hi, MidpointRounding.ToEven); 258MidpointRounding.ToEven => (midpointComparison > 0) || ((midpointComparison == 0) && isFloorOdd), 352case MidpointRounding.ToEven:
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal128.cs (2)
831public static Decimal128 Round(Decimal128 x) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), 0, MidpointRounding.ToEven)); 834public static Decimal128 Round(Decimal128 x, int digits) => new Decimal128(Number.RoundDecimalIeee754<Decimal128, UInt128>(new UInt128(x._upper, x._lower), digits, MidpointRounding.ToEven));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal32.cs (2)
842public static Decimal32 Round(Decimal32 x) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, 0, MidpointRounding.ToEven)); 845public static Decimal32 Round(Decimal32 x, int digits) => new Decimal32(Number.RoundDecimalIeee754<Decimal32, uint>(x._value, digits, MidpointRounding.ToEven));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Decimal64.cs (2)
835public static Decimal64 Round(Decimal64 x) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, 0, MidpointRounding.ToEven)); 838public static Decimal64 Round(Decimal64 x, int digits) => new Decimal64(Number.RoundDecimalIeee754<Decimal64, ulong>(x._value, digits, MidpointRounding.ToEven));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\VectorMath.cs (2)
1872case MidpointRounding.ToEven: 1918case MidpointRounding.ToEven: