Add missing snippet for sign/cwiseSign functions.

This commit is contained in:
Gael Guennebaud 2015-12-30 15:11:42 +01:00
parent 978c379ed7
commit 16dd82ed51
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,2 @@
Array3d v(-3,5,0);
cout << v.sign() << endl;

View File

@ -0,0 +1,4 @@
MatrixXd m(2,3);
m << 2, -4, 6,
-5, 1, 0;
cout << m.cwiseSign() << endl;