git-svn-id: svn://db.shs.com.ru/pip@157 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2015-09-29 10:49:46 +00:00
parent ffb294b7e0
commit 4c493443be

View File

@@ -108,7 +108,7 @@ public:
return f;}
template<uint Size1, typename Type1> /// vector {Size, Type} to vector {Size1, Type1}
PIMathVectorT<Size1, Type1> turnTo() {PIMathVectorT<Size1, Type1> tv; uint sz = piMin<uint>(Size, Size1); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;}
PIMathVectorT<Size1, Type1> turnTo() const {PIMathVectorT<Size1, Type1> tv; uint sz = piMin<uint>(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<typename Type1>
PIMathVector turnTo(uint size) {PIMathVector<Type1> tv; uint sz = piMin<uint>(size_, size); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;}
PIMathVector turnTo(uint size) const {PIMathVector<Type1> tv; uint sz = piMin<uint>(size_, size); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;}
private:
uint size_;