commit ee6918a0b7c5676134f83dd5eb2f55a2f62096e2
parent 3f4674803e5c0c83d5b62da419f0a4db88d1b41a
Author: Yoann <yoann.b87@voila.fr>
Date: Wed, 11 Jan 2012 18:55:42 +0100
Passage de la 2D à la 3D pour la fonction cosAngle dans vertex.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 {