Fixed Vector2::Normalize
Former-commit-id: c781e64262c0fbce2782f635c2db13478f18a9d5
This commit is contained in:
parent
8073e70090
commit
db2b33eda1
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue