From c59bf6f08a9df4b6c9b182ae3202129c52a5625f Mon Sep 17 00:00:00 2001 From: simochevsky Date: Sun, 22 Nov 2020 12:14:48 +0100 Subject: [PATCH] Update sell&buy price with latest market changes. Only takes into account the first 4 digits. --- Elinor/ClipboardTools.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Elinor/ClipboardTools.cs b/Elinor/ClipboardTools.cs index 5874c8b..335b3d8 100644 --- a/Elinor/ClipboardTools.cs +++ b/Elinor/ClipboardTools.cs @@ -47,7 +47,7 @@ internal static double GetSellPrice(double sell, Profile settings) } else { - result -= .01; + result -= Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01); } return result; @@ -67,7 +67,7 @@ internal static double GetBuyPrice(double buy, Profile settings) } else { - result += .01; + result += Math.Max(Math.Pow(10, Math.Floor(Math.Log10(result / 1000))), 0.01); } return result;