diff --git a/src/math/pimathvector.h b/src/math/pimathvector.h index 3841b7bf..53828e94 100644 --- a/src/math/pimathvector.h +++ b/src/math/pimathvector.h @@ -108,7 +108,7 @@ public: return f;} template /// vector {Size, Type} to vector {Size1, Type1} - PIMathVectorT turnTo() {PIMathVectorT tv; uint sz = piMin(Size, Size1); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;} + PIMathVectorT turnTo() const {PIMathVectorT tv; uint sz = piMin(Size, Size1); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;} private: void resize(const Type & new_value = Type()) {for (int i = 0; i < Size; ++i) c[i] = new_value;} @@ -210,7 +210,7 @@ public: return f;} template - PIMathVector turnTo(uint size) {PIMathVector tv; uint sz = piMin(size_, size); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;} + PIMathVector turnTo(uint size) const {PIMathVector tv; uint sz = piMin(size_, size); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;} private: uint size_;