mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-29 17:08:56 +08:00
fixed Vec3f::normal
This commit is contained in:
parent
09f88d293f
commit
ae6a2f12d4
|
@ -588,7 +588,8 @@ namespace Blah
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
Vec3<T> Vec3<T>::normal() const {
|
Vec3<T> Vec3<T>::normal() const {
|
||||||
return Vec3(x, y, z) / length();
|
T len = length();
|
||||||
|
return Vec3(x / len, y / len, z / len);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user