hi,
for the heading you can use ofVec2f::angle(…) although you will need to provide a reference vector, which I guess is ofVec2f(1,0)
so you can do something like
ofVec2f v1(1,0);//the vector from which you want to get its heading
float angle = v1.angle({0,1}); // angle is 90
The last line would be equivalent to
float angle = v1.angle(ofVec2f(0,1));
but you write less using the curly brackets as an initializer list.
For the PVector.fromAngle equivalent you can use
ofVec2f v = ofVec2f(1,0).getRotated(0.001);// pass an angle
Hi @hamoid, I think that the intention is to eventually deprecate ofVec*f and then remove it in favor of glm. When this happens none of the ofVec*f stuff will work.
@hamoid, certainly it would be better to avoid ofVec examples, but the original question was about ofVec and not glm. As ofVec is still there I think that it is still valid to answer on how to use it.
Thanks for the glm version to this answer.
cheers