summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2018-09-19 20:37:17 +0200
committerJan Kotas <jkotas@microsoft.com>2018-09-19 11:37:17 -0700
commitf52dfe474bd2462599f704346c80df5fbb80dfc3 (patch)
treec83047a0ae974162c610fbe3fec9e02e050a1d5d /src/System.Private.CoreLib
parent541f710095b6c10f2e650ad68e3f5961aa467d02 (diff)
downloadcoreclr-f52dfe474bd2462599f704346c80df5fbb80dfc3.tar.gz
coreclr-f52dfe474bd2462599f704346c80df5fbb80dfc3.tar.bz2
coreclr-f52dfe474bd2462599f704346c80df5fbb80dfc3.zip
Turns Math/MathF RoundLimit into a constant (#20044)
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r--src/System.Private.CoreLib/shared/System/Math.cs2
-rw-r--r--src/System.Private.CoreLib/shared/System/MathF.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Math.cs b/src/System.Private.CoreLib/shared/System/Math.cs
index ef46869e22..b211d3947a 100644
--- a/src/System.Private.CoreLib/shared/System/Math.cs
+++ b/src/System.Private.CoreLib/shared/System/Math.cs
@@ -28,7 +28,7 @@ namespace System
private const int maxRoundingDigits = 15;
- private static double doubleRoundLimit = 1e16d;
+ private const double doubleRoundLimit = 1e16d;
// This table is required for the Round function which can specify the number of digits to round to
private static double[] roundPower10Double = new double[] {
diff --git a/src/System.Private.CoreLib/shared/System/MathF.cs b/src/System.Private.CoreLib/shared/System/MathF.cs
index 5b7e48b062..7769023acb 100644
--- a/src/System.Private.CoreLib/shared/System/MathF.cs
+++ b/src/System.Private.CoreLib/shared/System/MathF.cs
@@ -28,7 +28,7 @@ namespace System
1e0f, 1e1f, 1e2f, 1e3f, 1e4f, 1e5f, 1e6f
};
- private static float singleRoundLimit = 1e8f;
+ private const float singleRoundLimit = 1e8f;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static float Abs(float x)