def test_rotate_certain_angle():
d1 = np.array([1.0, 0.0])
d2 = np.array([0.0, 1.0])
dnew1, dnew2 = rotate.rotate_certain_angle(d1, d2, 30.0)
dnew1_true = np.array([np.sqrt(3)/2.0, 0.5])
dnew2_true = np.array([-0.5, np.sqrt(3)/2.0])
npt.assert_allclose(dnew1, dnew1_true)
npt.assert_allclose(dnew2, dnew2_true)
test_rotate_utils.py 文件源码
python
阅读 24
收藏 0
点赞 0
评论 0
评论列表
文章目录