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
|
|
@ -43,7 +43,7 @@ inline Vector3<T>::Vector3(const Vector2<U>& vec)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
inline float Vector3<T>::length() const
|
||||
inline float Vector3<T>::len() const
|
||||
{
|
||||
return std::sqrt((x * x) + (y * y) + (z * z));
|
||||
}
|
||||
|
|
@ -55,9 +55,9 @@ Vector2<T> Vector3<T>::toVec2()
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
inline Vector3<T>& Vector3<T>::normalize()
|
||||
inline Vector3<T>& Vector3<T>::normal()
|
||||
{
|
||||
float il = 1.0f / length();
|
||||
float il = 1.0f / len();
|
||||
x *= il; y *= il; z *= il;
|
||||
return *this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue