mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 03:39:01 +08:00
Add missing snippet for sign/cwiseSign functions.
This commit is contained in:
parent
978c379ed7
commit
16dd82ed51
2
doc/snippets/Cwise_sign.cpp
Normal file
2
doc/snippets/Cwise_sign.cpp
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Array3d v(-3,5,0);
|
||||||
|
cout << v.sign() << endl;
|
4
doc/snippets/MatrixBase_cwiseSign.cpp
Normal file
4
doc/snippets/MatrixBase_cwiseSign.cpp
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
MatrixXd m(2,3);
|
||||||
|
m << 2, -4, 6,
|
||||||
|
-5, 1, 0;
|
||||||
|
cout << m.cwiseSign() << endl;
|
Loading…
x
Reference in New Issue
Block a user