Hi, I would like to create a function that creates a vec2 object from an angle. Much like the proccessing function vector.fromAngle()
The idea is angVec (float _angle) function that creates the vec2 object.
//cpp
angVec (float _angle){
float ang = _angle;
vec2 vec;
glm::rotate(vec, angle);
vecAng = glm::angle(vec) // return the angle for other purposes
}
Im struggling with the correct syntax for glm to make this work.
Perhaps this func already exists, any help much appreciated.
Chris