@pxt wrote:
Hi!
Im adding elements to a vectorfor(int i = 0; i < lines.size(); i++){ ofVec4f a = lines.at(i); for(int e = 0; e < lines.size(); e++){ if(e!=i){ ofVec4f b = lines.at(e); ofVec2f inter = lineToLineIntersection(a.x, a.y, a.z, a.w, b.x, b.y, b.z, b.w); intersectionPoints.push_back(inter); } } }
but i need to check if an element already exist, and if exist so dont add it.
In java exist a funcion : includes() to check it, and in processing i think that is another call hasExist()… there is something similar?
Posts: 2
Participants: 1