From ee6918a0b7c5676134f83dd5eb2f55a2f62096e2 Mon Sep 17 00:00:00 2001 From: Yoann Date: Wed, 11 Jan 2012 18:55:42 +0100 Subject: [PATCH] =?UTF-8?q?Passage=20de=20la=202D=20=C3=A0=20la=203D=20pou?= =?UTF-8?q?r=20la=20fonction=20cosAngle=20dans=20vertex.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- geometry/vertex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {