properly cast new operator * return values

This commit is contained in:
David Rose 2006-02-03 19:28:53 +00:00
parent c75b55eb98
commit b8b1e3d87e
2 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ FLOATNAME(LRotation)() {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LRotation)::
FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)& c) :
FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &c) :
FLOATNAME(LQuaternion)(c) {
}
@ -99,7 +99,7 @@ FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r) {
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation)::
operator * (FLOATTYPE scalar) const {
return FLOATNAME(LVecBase4)::operator * (scalar);
return FLOATNAME(LRotation)(FLOATNAME(LVecBase4)::operator * (scalar));
}
////////////////////////////////////////////////////////////////////
@ -109,7 +109,7 @@ operator * (FLOATTYPE scalar) const {
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation)::
operator / (FLOATTYPE scalar) const {
return FLOATNAME(LVecBase4)::operator / (scalar);
return FLOATNAME(LRotation)(FLOATNAME(LVecBase4)::operator / (scalar));
}
////////////////////////////////////////////////////////////////////
@ -118,7 +118,7 @@ operator / (FLOATTYPE scalar) const {
// Description: Rotation * Rotation = Rotation
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation)::
operator*(const FLOATNAME(LRotation)& other) const {
operator * (const FLOATNAME(LRotation) &other) const {
return multiply(other);
}
@ -130,7 +130,7 @@ operator*(const FLOATNAME(LRotation)& other) const {
// to apply an orientation to a rotation.
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LQuaternion) FLOATNAME(LRotation)::
operator*(const FLOATNAME(LQuaternion)& other) const {
operator * (const FLOATNAME(LQuaternion) &other) const {
nassert_raise("LRotation * LQuaternion is undefined; use LRotation * LRotation or LQuaternion * LQuaternion");
return multiply(other);
}

View File

@ -23,7 +23,7 @@
class EXPCL_PANDA FLOATNAME(LRotation) : public FLOATNAME(LQuaternion) {
PUBLISHED:
INLINE_LINMATH FLOATNAME(LRotation)();
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)&);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &);
INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &, FLOATTYPE);
INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &);
@ -34,10 +34,10 @@ PUBLISHED:
INLINE_LINMATH FLOATNAME(LRotation) operator / (FLOATTYPE scalar) const;
INLINE_LINMATH FLOATNAME(LRotation)
operator*(const FLOATNAME(LRotation)& other) const;
operator * (const FLOATNAME(LRotation) &other) const;
INLINE_LINMATH FLOATNAME(LQuaternion)
operator*(const FLOATNAME(LQuaternion)& other) const;
operator * (const FLOATNAME(LQuaternion) &other) const;
public:
static TypeHandle get_class_type() {