static int XwVectorsFindOrAdd(XwVector vector, IList <Vector> list) { Vector v = vector.ToOptVector(); int index = 0; for (; index < list.Count; index++) { if (XwVector.NearEqual(vector, new XwVector(list[index]))) { break; } } if (index >= list.Count) { list.Add(v); } return(index); }
static int XwVectorsFindOrAdd(Vector vector, IList <XwVector> list) { XwVector v = new XwVector(vector); int index = 0; for (; index < list.Count; index++) { if (XwVector.NearEqual(v, list[index])) { break; } } if (index >= list.Count) { list.Add(v); } return(index); }