mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-11-27 06:30:28 +08:00
fix skew symmetric test
This commit is contained in:
parent
128c8abf44
commit
ebd13c3b14
@ -177,7 +177,7 @@ void exponentialRotation() {
|
|||||||
|
|
||||||
// rotate around z-axis
|
// rotate around z-axis
|
||||||
Vector v2;
|
Vector v2;
|
||||||
v2 << 0, 0, EIGEN_PI;
|
v2 << 0, 0, Scalar(EIGEN_PI);
|
||||||
const SquareMatrix r2 = v2.asSkewSymmetric().exponential();
|
const SquareMatrix r2 = v2.asSkewSymmetric().exponential();
|
||||||
VERIFY_IS_APPROX(r2 * (Vector() << 1, 0, 0).finished(), (Vector() << -1, 0, 0).finished());
|
VERIFY_IS_APPROX(r2 * (Vector() << 1, 0, 0).finished(), (Vector() << -1, 0, 0).finished());
|
||||||
VERIFY_IS_APPROX(r2 * (Vector() << 0, 1, 0).finished(), (Vector() << 0, -1, 0).finished());
|
VERIFY_IS_APPROX(r2 * (Vector() << 0, 1, 0).finished(), (Vector() << 0, -1, 0).finished());
|
||||||
@ -196,8 +196,8 @@ EIGEN_DECLARE_TEST(skew_symmetric_matrix3) {
|
|||||||
CALL_SUBTEST_2(plusMinus<double>());
|
CALL_SUBTEST_2(plusMinus<double>());
|
||||||
CALL_SUBTEST_2(multiplyScale<float>());
|
CALL_SUBTEST_2(multiplyScale<float>());
|
||||||
CALL_SUBTEST_2(multiplyScale<double>());
|
CALL_SUBTEST_2(multiplyScale<double>());
|
||||||
CALL_SUBTEST_2(skewSymmetricMultiplication(MatrixXf(3, internal::random<int>(1, EIGEN_TEST_MAX_SIZE))));
|
CALL_SUBTEST_2(skewSymmetricMultiplication(MatrixXf(3, internal::random<int>(3, EIGEN_TEST_MAX_SIZE))));
|
||||||
CALL_SUBTEST_2(skewSymmetricMultiplication(MatrixXd(3, internal::random<int>(1, EIGEN_TEST_MAX_SIZE))));
|
CALL_SUBTEST_2(skewSymmetricMultiplication(MatrixXd(3, internal::random<int>(3, EIGEN_TEST_MAX_SIZE))));
|
||||||
CALL_SUBTEST_2(traceAndDet<float>());
|
CALL_SUBTEST_2(traceAndDet<float>());
|
||||||
CALL_SUBTEST_2(traceAndDet<double>());
|
CALL_SUBTEST_2(traceAndDet<double>());
|
||||||
CALL_SUBTEST_2(transpose<float>());
|
CALL_SUBTEST_2(transpose<float>());
|
||||||
|
Loading…
Reference in New Issue
Block a user