[DEV] add absolute calculation of the vec3

This commit is contained in:
Edouard DUPIN 2013-01-04 21:32:30 +01:00
parent 3b5aa7b84f
commit 52d5bd1810

View File

@ -293,6 +293,22 @@ namespace etk
{
return (x*x)+(y*y)+(z*z);
};
/**
* @brief Set the absolute value of the vector
*/
void Abs(void)
{
if (x<0) {
x = -x;
}
if (y<0) {
y = -y;
}
if (z<0) {
z = -z;
}
};
//rotations
void RotateX(float angle)