Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

How to get average of vector?

$
0
0

@cuinjune wrote:

Hi, I'm trying to find out the average ofVec2f value from vector<ofVec2f>.

I found out there is ofVec2f::average(const ofVec2f *points, int num) method which does the job but I can't figure out how to convert vector<ofVec2f> to const ofVec2f* so I can pass the vector of ofVec2f as an argument.

How can I pass vector<ofVec2f> to the ofVec2f::average() method?
Thanks in advance!

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles