The compiler is probably getting confused if you inline it and it isn't available to all translation units (i.e. you need to define it in the class declaration or in the header)?haha yes that solved it... stupid me for not seeing it myself
i just removed the 'inline' keyword. took me some time googling to fully understand whats going on, but i get it now
this can be closed i guess
thanks a plenty to everyone again, <3 this forum
EDIT: i also moved to returning a reference for assignments:
Vector3 &Vector3::operator=(const Vector3 &v) { x = v.x; y = v.y; z = v.z; return *this; }i assume this the proper way to do this?
Shouldn't it be:
Vector3& Vector3::operator=(const Vector3& v)
{
if(this != &v)
{
x = v.x;
y = v.y;
z = v.z;
}
return *this;
}
Oh and why not use a pre-made math library such as GLM?