/// <summary> /// Create a curve from <see cref="CurveFunction"/> definitions. /// </summary> public static EQCurve CreateCurve(CurveFunction function) { switch (function) { case CurveFunction.XCurve: return(new XCurve()); case CurveFunction.Punch: return(new Punch()); case CurveFunction.Depth: return(new Depth()); case CurveFunction.RoomCurve: return(new RoomCurve()); case CurveFunction.Bandpass: case CurveFunction.Custom: case CurveFunction.Smoother: throw new Exception(constructorException); default: return(new Flat()); } }
public int GetExperienceRequiredForLevel(int level) { if (level < 0) { return(ScalingFactor); } return((int)CurveFunction.ScaledPlot(ScalingFactor * level, MaxExperienceValue)); }
public Curve(Interval interval, CurveFunction f) { for (double x = interval.start; x <= interval.end; x += Geometry.period) { points.Add(new Point(x, f(x))); curveFunction = f; } }