Mercurial > mm7
diff VectorTypes.cpp @ 2464:104fdbea0386
cleaning project part 2
author | zipi |
---|---|
date | Sun, 17 Aug 2014 17:49:34 +0100 |
parents | f4af3b203f65 |
children |
line wrap: on
line diff
--- a/VectorTypes.cpp Sun Aug 17 15:13:18 2014 +0100 +++ b/VectorTypes.cpp Sun Aug 17 17:49:34 2014 +0100 @@ -66,3 +66,11 @@ } template Vec3<int32_t>; + +//----- (004369DB) -------------------------------------------------------- +void Vec3_float_::Normalize() +{ + this->x = (1.0 / sqrt(this->x * this->x + this->y * this->y + this->z * this->z)) * this->x; + this->y = (1.0 / sqrt(this->x * this->x + this->y * this->y + this->z * this->z)) * this->y; + this->z = (1.0 / sqrt(this->x * this->x + this->y * this->y + this->z * this->z)) * this->z; +} \ No newline at end of file