1
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2025-05-07 13:33:24 +08:00
eigen/doc/snippets/Cwise_rint.cpp
Ilya Tokar 19876ced76 Bug : Introduce numext::rint.
This provides a new op that matches std::rint and previous behavior of
pround. Also adds corresponding unsupported/../Tensor op.
Performance is the same as e. g. floor (tested SSE/AVX).
2020-01-07 21:22:44 +00:00

4 lines
92 B
C++

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << rint(v) << endl;