Spectre/Math: rename all vector length() and normalize() functions to len() and normal()
This commit is contained in:
parent
4a6a20342d
commit
43354fc9b4
7 changed files with 17 additions and 17 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue