Example #1
0
def test_rotation2d_from_vector():
    theta = np.pi / 2
    h**o = np.array([[0.0, -1.0, 0.0],
                     [1.0, 0.0, 0.0],
                     [0.0, 0.0, 1.0]], dtype=np.float64)

    tr = Rotation2D.identity().from_vector(theta)

    assert_allclose(tr.h_matrix, h**o, atol=1**-15)
Example #2
0
def test_rotation2d_identity():
    assert_allclose(Rotation2D.identity().h_matrix, np.eye(3))