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