public static Curve Parse(string definition) { if (string.IsNullOrEmpty(definition)) return CreateNonConfigured(); var data = definition.SplitFast(','); var interpolator = new MonotoneCubicInterpolator(); for (int i = 0; i < data.Length; i += 2) { var a = Utils.ParseDoubleInvariant(data[i]); var b = Utils.ParseDoubleInvariant(data[i + 1]); interpolator.Add(a, b); } var c = new Curve(); c.Interpolator = interpolator; return c; }
public static Curve Parse(string definition) { if (string.IsNullOrEmpty(definition)) { return(CreateNonConfigured()); } var data = definition.SplitFast(','); var interpolator = new MonotoneCubicInterpolator(); for (int i = 0; i < data.Length; i += 2) { var a = Utils.ParseDoubleInvariant(data[i]); var b = Utils.ParseDoubleInvariant(data[i + 1]); interpolator.Add(a, b); } var c = new Curve(); c.Interpolator = interpolator; return(c); }