Quantcast
Viewing all articles
Browse latest Browse all 40524

Using OF Function in a Function

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;
}

Viewing all articles
Browse latest Browse all 40524

Trending Articles