def test_vector_angle_between(): computed_deg = linalg.vector_angle_between((1, 2, 3), (3, 2, 1), degrees=True) computed_rad = linalg.vector_angle_between((1, 2, 3), (3, 2, 1), degrees=False) result_deg = 44.415308597193 result_rad = 0.775193373310361 assert abs(computed_deg - result_deg) < GEOMDL_DELTA assert abs(computed_rad - result_rad) < GEOMDL_DELTA
def test_vector_angle_between(): computed_deg = linalg.vector_angle_between((1, 2, 3), (3, 2, 1), degrees=True) computed_rad = linalg.vector_angle_between((1, 2, 3), (3, 2, 1), degrees=False) result_deg = 44.415308597193 result_rad = 0.775193373310361 assert abs(computed_deg - result_deg) < GEOMDL_DELTA assert abs(computed_rad - result_rad) < GEOMDL_DELTA
def test_bspline_curve3d_nb_vector(spline_curve3d): angle = 90.0 b = spline_curve3d.binormal(0.5) n = spline_curve3d.normal(0.5) res = linalg.vector_angle_between(b[1], n[1]) assert angle == res
def test_bspline_curve3d_tb_vector(spline_curve3d): angle = 90.0 t = spline_curve3d.tangent(0.5) b = spline_curve3d.binormal(0.5) res = linalg.vector_angle_between(t[1], b[1]) assert angle == res
def test_bspline_curve2d_tn_vector(spline_curve): angle = 90.0 t = spline_curve.tangent(0.5) n = spline_curve.normal(0.5) res = linalg.vector_angle_between(t[1], n[1]) assert angle == res