public double GetPercentDifference(StatBasicStatuses averagingMethod) { double absoluteDiff = this.GetAbsoluteDifference(averagingMethod); return absoluteDiff / (this.HighestValue - this.LowestValue); }
protected Stat SearchForNeeds(StatBasicStatuses highestInclusiveGroup) { Stat worstStat = this.Agent.Stats.GetWorstStat(highestInclusiveGroup); return worstStat; }
public double GetAbsoluteDifference(StatBasicStatuses averagingMethod) { double average = 0; if (this.StatShape == StatShapes.Symmetric) { if (averagingMethod == StatBasicStatuses.Nominal) { average = (this.HigherNominalValue + this.LowerNominalValue) / 2.0; } else if (averagingMethod == StatBasicStatuses.Danger) { average = (this.HigherDangerValue - this.LowerDangerValue) / 2.0; } else if (averagingMethod == StatBasicStatuses.Fatal) { average = (this.HighestValue - this.LowestValue) / 2.0; } } else { average = this.HighestValue; } return (double)this.Value - average; }