Now changing the mouse getters is better as Zach suggested:
float ofApp::distance(int n,int valX, int valY) {
float d,x,y;
x = ofGetMouseX();
y = ofGetMouseY();
d = sqrt((valY-y)*(valY-y)+(valX-x)(valX-x));
return d;
}
Now changing the mouse getters is better as Zach suggested:
float ofApp::distance(int n,int valX, int valY) {
float d,x,y;
x = ofGetMouseX();
y = ofGetMouseY();
d = sqrt((valY-y)*(valY-y)+(valX-x)(valX-x));
return d;
}