Commit ad0c3aa8 authored by gsell's avatar gsell Committed by kraus

adapted to Intel C++

parent 46afbd99
......@@ -25,18 +25,18 @@ public:
Quaternion& operator*=(const Quaternion &);
const Quaternion operator/(const double &) const;
const double Norm() const;
const double length() const;
double Norm() const;
double length() const;
Quaternion & normalize();
const bool isUnit() const;
const bool isPure() const;
const bool isPureUnit() const;
bool isUnit() const;
bool isPure() const;
bool isPureUnit() const;
const Quaternion inverse() const;
const Quaternion conjugate() const;
const double real() const;
double real() const;
const Vector_t imag() const;
const Vector_t rotate(const Vector_t &) const;
......@@ -76,31 +76,31 @@ Quaternion::Quaternion(const double & realPart, const Vector_t & vec):
{}
inline
const double Quaternion::Norm() const
double Quaternion::Norm() const
{
return dot(*this, *this);
}
inline
const double Quaternion::length() const
double Quaternion::length() const
{
return sqrt(this->Norm());
}
inline
const bool Quaternion::isUnit() const
bool Quaternion::isUnit() const
{
return (std::abs(this->Norm() - 1.0) < 1e-12);
}
inline
const bool Quaternion::isPure() const
bool Quaternion::isPure() const
{
return (std::abs((*this)(0)) < 1e-12);
}
inline
const bool Quaternion::isPureUnit() const
bool Quaternion::isPureUnit() const
{
return (this->isPure() && this->isUnit());
}
......@@ -114,7 +114,7 @@ const Quaternion Quaternion::conjugate() const
}
inline
const double Quaternion::real() const
double Quaternion::real() const
{
return (*this)(0);
}
......
......@@ -57,7 +57,7 @@ public:
assertion( const assertion& a );
~assertion() throw() { delete[] msg; }
assertion& operator=( const assertion& a );
const char* what() const noexcept { return msg; }
const char* what() { return msg; }
};
//---------------------------------------------------------------------------//
......
......@@ -186,19 +186,19 @@ public:
inline const Vector_t& v1() const {
return pts[0];
}
inline const double v1(int i) const {
inline double v1(int i) const {
return pts[0][i];
}
inline const Vector_t& v2() const {
return pts[1];
}
inline const double v2(int i) const {
inline double v2(int i) const {
return pts[1][i];
}
inline const Vector_t& v3() const {
return pts[2];
}
inline const double v3(int i) const {
inline double v3(int i) const {
return pts[2][i];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment