how do i use the vector average function.
i know this line is wrong ofVec2f pointAverage = points.average(points,points.getPoint.size());
but i have no idea how to properly call average.
i could cycle through the points myself, but thought it would be nice to use ofVec2f average.
thx.
vector<ofVec2f> points;
//--------------------------------------------------------------
void testApp::update(){
points.push_back(ofVec2f(mouseX,mouseY));
}
//--------------------------------------------------------------
void testApp::draw(){
ofSetColor(0);
for(int i=0; i<points.size(); i++){
ofCircle(points[i], 1);
}
ofSetColor(255, 0, 0);
ofVec2f pointAverage = points.average(points,points.getPoint.size());
ofCircle(pointAverage, 1);
}