Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

Using OF Function in a Function

$
0
0

Just like any regular call

void ofApp::draw() {
    float dist = distance(n, valx, valy);
}

float ofApp::distance(int n,int valX, int valY){
    float d;
    d = sqrt((valY-mouseY)*(valY-mouseY)+(valX-mouseX)(valX-mouseX));
    return d;
}

Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>