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

Using OF Function in a Function

$
0
0

Hello, in OF exist a function for compute distance between two points:
example:
float distance = ofDist(x,y, ofGetMouseX(), ofGetMouseY());
you see the apropiatte doc in OF reference but the function receiva four parameters:
float x1 = the x1 coordinate of point A.
float y1 = the y1 coordinate of point A
float x2 = the x2 coordinate of point B
float y2 = the y2 coordinate of point B
and return distance between point A and B.


Viewing all articles
Browse latest Browse all 40524

Trending Articles