1
0
Fork 0

Spectre/Math: rename all vector length() and normalize() functions to len() and normal()

This commit is contained in:
Henrik Hautakoski 2023-04-30 23:07:25 +02:00
parent 4a6a20342d
commit 43354fc9b4
7 changed files with 17 additions and 17 deletions

View file

@ -36,15 +36,15 @@ Vector4<T>::Vector4(const Vector4<U>& vec)
}
template <typename T>
float Vector4<T>::length() const
float Vector4<T>::len() const
{
return std::sqrt((x * x) + (y * y) + (z * z) + (w * w));
}
template <typename T>
Vector4<T>& Vector4<T>::normalize()
Vector4<T>& Vector4<T>::normal()
{
float il = 1.0f / length();
float il = 1.0f / len();
x *= il; y *= il; z *= il; w *= il;
return *this;
}