[DEV] add absolute calculation of the vec3
This commit is contained in:
parent
3b5aa7b84f
commit
52d5bd1810
@ -293,6 +293,22 @@ namespace etk
|
|||||||
{
|
{
|
||||||
return (x*x)+(y*y)+(z*z);
|
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
|
//rotations
|
||||||
void RotateX(float angle)
|
void RotateX(float angle)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user