parent
8b3a683eb0
commit
2f87972d80
|
@ -281,7 +281,9 @@ namespace Core.ProfitTrailer
|
|||
double oldValue = SystemHelper.TextToDouble(oldValueString, 0, "en-US");
|
||||
if (oldValue < 0) offsetValuePercent = offsetValuePercent * -1;
|
||||
double oldValueOffset = (oldValue * (offsetValuePercent / 100));
|
||||
newValueString = Math.Round((oldValue + oldValueOffset), 8).ToString(new System.Globalization.CultureInfo("en-US"));
|
||||
//Round up any decimal value >= .5
|
||||
int newValueTempString = (int)(Math.Round((oldValue + oldValueOffset), MidpointRounding.AwayFromZero) + .5);
|
||||
newValueString = newValueTempString.ToString(new System.Globalization.CultureInfo("en-US"));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue