Backed out changeset 04c8c5d9ef

This commit is contained in:
Gael Guennebaud
2015-04-15 14:47:08 +02:00
parent 04c8c5d9ef
commit 5dbe758dc3
3 changed files with 8 additions and 65 deletions

View File

@@ -18,9 +18,6 @@ namespace Eigen {
* \returns the cross product of \c *this and \a other
*
* Here is a very good explanation of cross-product: http://xkcd.com/199/
*
* With complex numbers, the cross product is implemented as \f$ \mathbf{a}+\mathrm{i}\mathbf{b}) \times \f$
*
* \sa MatrixBase::cross3()
*/
template<typename Derived>

View File

@@ -637,7 +637,7 @@ inline Quaternion<typename internal::traits<Derived>::Scalar> QuaternionBase<Der
{
// FIXME should this function be called multiplicativeInverse and conjugate() be called inverse() or opposite() ??
Scalar n2 = this->squaredNorm();
if (n2 > Scalar(0))
if (n2 > 0)
return Quaternion<Scalar>(conjugate().coeffs() / n2);
else
{
@@ -723,7 +723,7 @@ QuaternionBase<Derived>::slerp(const Scalar& t, const QuaternionBase<OtherDerive
scale0 = sin( ( Scalar(1) - t ) * theta) / sinTheta;
scale1 = sin( ( t * theta) ) / sinTheta;
}
if(d<Scalar(0)) scale1 = -scale1;
if(d<0) scale1 = -scale1;
return Quaternion<Scalar>(scale0 * coeffs() + scale1 * other.coeffs());
}