fmin and fmax should be const methods

This commit is contained in:
rdb 2014-12-18 16:58:03 -05:00
parent 270667ece2
commit cb66a51bbc
6 changed files with 12 additions and 12 deletions

View File

@ -754,7 +754,7 @@ componentwise_mult(const FLOATNAME(LVecBase2) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2)::
fmax(const FLOATNAME(LVecBase2) &other) {
fmax(const FLOATNAME(LVecBase2) &other) const {
TAU_PROFILE("LVecBase2::fmax()", " ", TAU_USER);
return FLOATNAME(LVecBase2)(_v(0) > other._v(0) ? _v(0) : other._v(0),
_v(1) > other._v(1) ? _v(1) : other._v(1));
@ -766,7 +766,7 @@ fmax(const FLOATNAME(LVecBase2) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase2) FLOATNAME(LVecBase2)::
fmin(const FLOATNAME(LVecBase2) &other) {
fmin(const FLOATNAME(LVecBase2) &other) const {
TAU_PROFILE("LVecBase2::fmin()", " ", TAU_USER);
return FLOATNAME(LVecBase2)(_v(0) < other._v(0) ? _v(0) : other._v(0),
_v(1) < other._v(1) ? _v(1) : other._v(1));

View File

@ -126,8 +126,8 @@ PUBLISHED:
EXTENSION(INLINE_LINMATH FLOATNAME(LVecBase2) __pow__(FLOATTYPE exponent) const);
EXTENSION(INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent));
INLINE_LINMATH FLOATNAME(LVecBase2) fmax(const FLOATNAME(LVecBase2) &other);
INLINE_LINMATH FLOATNAME(LVecBase2) fmin(const FLOATNAME(LVecBase2) &other);
INLINE_LINMATH FLOATNAME(LVecBase2) fmax(const FLOATNAME(LVecBase2) &other) const;
INLINE_LINMATH FLOATNAME(LVecBase2) fmin(const FLOATNAME(LVecBase2) &other) const;
INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase2) &other,
FLOATTYPE threshold) const;

View File

@ -931,7 +931,7 @@ componentwise_mult(const FLOATNAME(LVecBase3) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3)::
fmax(const FLOATNAME(LVecBase3) &other) {
fmax(const FLOATNAME(LVecBase3) &other) const {
TAU_PROFILE("LVecBase3::fmax()", " ", TAU_USER);
return FLOATNAME(LVecBase3)(_v(0) > other._v(0) ? _v(0) : other._v(0),
_v(1) > other._v(1) ? _v(1) : other._v(1),
@ -944,7 +944,7 @@ fmax(const FLOATNAME(LVecBase3) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase3) FLOATNAME(LVecBase3)::
fmin(const FLOATNAME(LVecBase3) &other) {
fmin(const FLOATNAME(LVecBase3) &other) const {
TAU_PROFILE("LVecBase3::fmin()", " ", TAU_USER);
return FLOATNAME(LVecBase3)(_v(0) < other._v(0) ? _v(0) : other._v(0),
_v(1) < other._v(1) ? _v(1) : other._v(1),

View File

@ -139,8 +139,8 @@ PUBLISHED:
EXTENSION(INLINE_LINMATH FLOATNAME(LVecBase3) __pow__(FLOATTYPE exponent) const);
EXTENSION(INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent));
INLINE_LINMATH FLOATNAME(LVecBase3) fmax(const FLOATNAME(LVecBase3) &other);
INLINE_LINMATH FLOATNAME(LVecBase3) fmin(const FLOATNAME(LVecBase3) &other);
INLINE_LINMATH FLOATNAME(LVecBase3) fmax(const FLOATNAME(LVecBase3) &other) const;
INLINE_LINMATH FLOATNAME(LVecBase3) fmin(const FLOATNAME(LVecBase3) &other) const;
INLINE_LINMATH void cross_into(const FLOATNAME(LVecBase3) &other);

View File

@ -915,7 +915,7 @@ componentwise_mult(const FLOATNAME(LVecBase4) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4)::
fmax(const FLOATNAME(LVecBase4) &other) {
fmax(const FLOATNAME(LVecBase4) &other) const {
TAU_PROFILE("LVecBase4::fmax()", " ", TAU_USER);
return FLOATNAME(LVecBase4)(_v(0) > other._v(0) ? _v(0) : other._v(0),
_v(1) > other._v(1) ? _v(1) : other._v(1),
@ -929,7 +929,7 @@ fmax(const FLOATNAME(LVecBase4) &other) {
// Description:
////////////////////////////////////////////////////////////////////
INLINE_LINMATH FLOATNAME(LVecBase4) FLOATNAME(LVecBase4)::
fmin(const FLOATNAME(LVecBase4) &other) {
fmin(const FLOATNAME(LVecBase4) &other) const {
TAU_PROFILE("LVecBase4::fmin()", " ", TAU_USER);
return FLOATNAME(LVecBase4)(_v(0) < other._v(0) ? _v(0) : other._v(0),
_v(1) < other._v(1) ? _v(1) : other._v(1),

View File

@ -140,8 +140,8 @@ PUBLISHED:
EXTENSION(INLINE_LINMATH FLOATNAME(LVecBase4) __pow__(FLOATTYPE exponent) const);
EXTENSION(INLINE_LINMATH PyObject *__ipow__(PyObject *self, FLOATTYPE exponent));
INLINE_LINMATH FLOATNAME(LVecBase4) fmax(const FLOATNAME(LVecBase4) &other);
INLINE_LINMATH FLOATNAME(LVecBase4) fmin(const FLOATNAME(LVecBase4) &other);
INLINE_LINMATH FLOATNAME(LVecBase4) fmax(const FLOATNAME(LVecBase4) &other) const;
INLINE_LINMATH FLOATNAME(LVecBase4) fmin(const FLOATNAME(LVecBase4) &other) const;
INLINE_LINMATH bool almost_equal(const FLOATNAME(LVecBase4) &other,
FLOATTYPE threshold) const;