private static Finish ( Lut values, string data, int index, int line, double &key, int &started, int &malformed ) : void | ||
values | Lut | |
data | string | |
index | int | |
line | int | |
key | double | |
started | int | |
malformed | int | |
return | void |
private static void Finish(Lut values, string data, int index, int line, ref double key, ref int started, ref int malformed) {
if (started != -1) {
if (double.IsNaN(key)) {
if (malformed == -1) malformed = line;
} else {
double value;
if (FlexibleParser.TryParseDouble(data.Substring(started, index - started), out value)) {
values.Add(new LutPoint(key, value));
} else {
if (malformed == -1) malformed = line;
}
key = double.NaN;
}
started = -1;
} else if (!double.IsNaN(key)) {
key = double.NaN;
}
}