PIVector2D resize
This commit is contained in:
@@ -218,7 +218,7 @@ public:
|
|||||||
int cs = (cols - cols_);
|
int cs = (cols - cols_);
|
||||||
if (cs < 0) {
|
if (cs < 0) {
|
||||||
for (size_t r=0; r<rows; ++r) {
|
for (size_t r=0; r<rows; ++r) {
|
||||||
mat.remove(r*cols_ + cols_, -cs);
|
mat.remove(r*cols + cols, -cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mat.resize(rows*cols, f);
|
mat.resize(rows*cols, f);
|
||||||
|
|||||||
11
main.cpp
11
main.cpp
@@ -40,12 +40,11 @@ inline PIByteArray & operator >>(PIByteArray & ba, MM & v) {piCout << ">>"
|
|||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
PIMathMatrixd m = PIMathMatrixd::identity(3,3);
|
PIMathMatrixd m = PIMathMatrixd::identity(5,5);
|
||||||
m.fill(0);
|
// m.fill(9);
|
||||||
PIMathMatrixd m2 = PIMathMatrixd::identity(3,4);
|
//PIMathMatrixd m2 = PIMathMatrixd::identity(3,4);
|
||||||
|
piCout << m;
|
||||||
|
m.resize(3,3);
|
||||||
piCout << m;
|
piCout << m;
|
||||||
piCout << m2;
|
|
||||||
piCout << m * m2;
|
|
||||||
piCout << m2 * m;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user