From a433a9ca4b4d7f37987db11a7e842e64517edf27 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 16 Jan 2018 15:26:16 -0800 Subject: [PATCH] Matching non-shared Decimal changes --- src/mscorlib/src/System/Decimal.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mscorlib/src/System/Decimal.cs b/src/mscorlib/src/System/Decimal.cs index 67c2c87..b66519c 100644 --- a/src/mscorlib/src/System/Decimal.cs +++ b/src/mscorlib/src/System/Decimal.cs @@ -353,7 +353,7 @@ namespace System // positive, the result is d. If d is negative, the result // is -d. // - internal static Decimal Abs(Decimal d) + internal static Decimal Abs(ref Decimal d) { return new Decimal(d.lo, d.mid, d.hi, d.flags & ~SignMask); } @@ -714,14 +714,14 @@ namespace System // Returns the larger of two Decimal values. // - internal static Decimal Max(Decimal d1, Decimal d2) + internal static Decimal Max(ref Decimal d1, ref Decimal d2) { return FCallCompare(ref d1, ref d2) >= 0 ? d1 : d2; } // Returns the smaller of two Decimal values. // - internal static Decimal Min(Decimal d1, Decimal d2) + internal static Decimal Min(ref Decimal d1, ref Decimal d2) { return FCallCompare(ref d1, ref d2) < 0 ? d1 : d2; } @@ -737,7 +737,7 @@ namespace System // This piece of code is to work around the fact that Dividing a decimal with 28 digits number by decimal which causes // causes the result to be 28 digits, can cause to be incorrectly rounded up. // eg. Decimal.MaxValue / 2 * Decimal.MaxValue will overflow since the division by 2 was rounded instead of being truncked. - if (Abs(d1) < Abs(d2)) + if (Math.Abs(d1) < Math.Abs(d2)) { return d1; } -- 2.7.4