fixed Vec3f::normal

This commit is contained in:
Noel Berry 2022-02-01 19:48:01 -08:00 committed by GitHub
parent 09f88d293f
commit ae6a2f12d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -588,7 +588,8 @@ namespace Blah
template<class T>
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>