diff --git a/geometry/vertex.cpp b/geometry/vertex.cpp index f72b6c2..5ca7ce3 100644 --- a/geometry/vertex.cpp +++ b/geometry/vertex.cpp @@ -36,7 +36,7 @@ Vertex Vertex::setNorm(float n) const { float Vertex::cosAngle(Vertex v) const { // http://www.developpez.net/forums/d202580/applications/developpement-2d-3d-jeux/contribuez/faq-mat-quat-ajout-calculs-vectoriels/ - return ((this->x*v.x + this->y*v.y) / (norm()*v.norm())); + return ((this->x*v.x + this->y*v.y + this->z*v.z) / (norm()*v.norm())); } float Vertex::angle(Vertex v) const {