diff options
author | Gael Guennebaud <g.gael@free.fr> | 2008-08-28 17:44:27 +0000 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2008-08-28 17:44:27 +0000 |
commit | 9b4d46c82ebd6cd71f1ca559f73ea5864c6ef835 (patch) | |
tree | 0bfae5c146ba31a2c845cc502006bf3531b188ce /Eigen/src/Geometry/OrthoMethods.h | |
parent | ee2df6026abe8ab6e4615b8cee84aaeeea83efdc (diff) |
* Add an HyperPlane class in the Geometry module
with its respective unit-test.
Feel free to discuss the API on the ML.
* Some bugfix in unitOrthogonal found by the hyperplane unit test.
Diffstat (limited to 'Eigen/src/Geometry/OrthoMethods.h')
-rw-r--r-- | Eigen/src/Geometry/OrthoMethods.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index 9ca107541..3c310badd 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -54,7 +54,7 @@ struct ei_unitOrthogonal_selector typedef typename NumTraits<Scalar>::Real RealScalar; inline static VectorType run(const Derived& src) { - VectorType perp; + VectorType perp(src.size()); /* Let us compute the crossed product of *this with a vector * that is not too close to being colinear to *this. */ @@ -65,7 +65,7 @@ struct ei_unitOrthogonal_selector if((!ei_isMuchSmallerThan(src.x(), src.z())) || (!ei_isMuchSmallerThan(src.y(), src.z()))) { - RealScalar invnm = Scalar(1)/src.template start<2>().norm(); + RealScalar invnm = RealScalar(1)/src.template start<2>().norm(); perp.coeffRef(0) = -ei_conj(src.y())*invnm; perp.coeffRef(1) = ei_conj(src.x())*invnm; perp.coeffRef(2) = 0; @@ -76,7 +76,7 @@ struct ei_unitOrthogonal_selector */ else { - RealScalar invnm = Scalar(1)/src.template end<2>().norm(); + RealScalar invnm = RealScalar(1)/src.template end<2>().norm(); perp.coeffRef(0) = 0; perp.coeffRef(1) = -ei_conj(src.z())*invnm; perp.coeffRef(2) = ei_conj(src.y())*invnm; |