Bugfix for operator<<

This commit is contained in:
Guillaume Damiand 2018-09-11 11:46:26 +02:00
parent 64c7a083ce
commit 1db0bd0a79
2 changed files with 10 additions and 8 deletions

View File

@ -529,11 +529,6 @@ Quaternion Quaternion::squadTangent(const Quaternion &before,
return e; return e;
} }
CGAL_INLINE_FUNCTION
std::ostream &operator<<(std::ostream &o, const Quaternion &Q) {
return o << Q[0] << '\t' << Q[1] << '\t' << Q[2] << '\t' << Q[3];
}
/*! Returns a random unit Quaternion. /*! Returns a random unit Quaternion.
You can create a randomly directed unit vector using: You can create a randomly directed unit vector using:
@ -556,4 +551,10 @@ Quaternion Quaternion::randomQuaternion() {
qreal t2 = 2.0 * CGAL_PI * (rand() / (qreal)RAND_MAX); qreal t2 = 2.0 * CGAL_PI * (rand() / (qreal)RAND_MAX);
return Quaternion(sin(t1) * r1, cos(t1) * r1, sin(t2) * r2, cos(t2) * r2); return Quaternion(sin(t1) * r1, cos(t1) * r1, sin(t2) * r2, cos(t2) * r2);
} }
}}
}} // namespace CGAL::qglviewer
CGAL_INLINE_FUNCTION
std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Quaternion &Q) {
return o << Q[0] << '\t' << Q[1] << '\t' << Q[2] << '\t' << Q[3];
}

View File

@ -174,8 +174,9 @@ void Vec::initFromDOMElement(const QDomElement &element) {
*this = v; *this = v;
} }
}} // namespace CGAL::qglviewer
CGAL_INLINE_FUNCTION CGAL_INLINE_FUNCTION
std::ostream &operator<<(std::ostream &o, const Vec &v) { std::ostream &operator<<(std::ostream &o, const CGAL::qglviewer::Vec &v) {
return o << v.x << '\t' << v.y << '\t' << v.z; return o << v.x << '\t' << v.y << '\t' << v.z;
} }
}}