Fixed Vector2::Normalize
Former-commit-id: c781e64262c0fbce2782f635c2db13478f18a9d5
This commit is contained in:
@@ -145,7 +145,7 @@ template<typename T>
|
|||||||
NzVector2<T>& NzVector2<T>::Normalize(T* length)
|
NzVector2<T>& NzVector2<T>::Normalize(T* length)
|
||||||
{
|
{
|
||||||
T norm = std::sqrt(GetSquaredLength());
|
T norm = std::sqrt(GetSquaredLength());
|
||||||
T invNorm = F(1.0) / length;
|
T invNorm = F(1.0) / norm;
|
||||||
|
|
||||||
x *= invNorm;
|
x *= invNorm;
|
||||||
y *= invNorm;
|
y *= invNorm;
|
||||||
|
|||||||
Reference in New Issue
Block a user