picout and clean

This commit is contained in:
Бычков Андрей
2022-08-08 16:44:37 +03:00
parent 8551499a5e
commit 724a2dffcf
16 changed files with 242 additions and 187 deletions

View File

@@ -238,7 +238,15 @@ inline PIMathVectorT<Size, Type> operator *(const Type & x, const PIMathVectorT<
}
template<uint Size, typename Type>
inline PICout operator <<(PICout s, const PIMathVectorT<Size, Type> & v) {s << "{"; PIMV_FOR {s << v[i]; if (i < Size - 1) s << ", ";} s << "}"; return s;}
inline PICout operator <<(PICout s, const PIMathVectorT<Size, Type> & v) {
s << "Vector{";
PIMV_FOR {
s << v[i];
if (i < Size - 1) s << ", ";
}
s << "}";
return s;
}
typedef PIMathVectorT<2u, int> PIMathVectorT2i;
@@ -510,7 +518,15 @@ inline std::ostream & operator <<(std::ostream & s, const PIMathVector<Type> & v
#endif
template<typename Type>
inline PICout operator <<(PICout s, const PIMathVector<Type> & v) {s << "Vector{"; for (uint i = 0; i < v.size(); ++i) {s << v[i]; if (i < v.size() - 1) s << ", ";} s << "}"; return s;}
inline PICout operator <<(PICout s, const PIMathVector<Type> & v) {
s << "Vector{";
for (uint i = 0; i < v.size(); ++i) {
s << v[i];
if (i < v.size() - 1) s << ", ";
}
s << "}";
return s;
}
template <typename P, typename T>
inline PIBinaryStream<P> & operator <<(PIBinaryStream<P> & s, const PIMathVector<T> & v) {s << v.c; return s;}