def test_set_length_batch_vector(self): result = vector3.set_length([ [1., 1., 1.], [-1., -1., -1.], [0., 2., 7.], ], 2.0) expected = [ [1.15470, 1.15470, 1.15470], [-1.15470, -1.15470, -1.15470], [0., 0.54944, 1.92304], ] np.testing.assert_almost_equal(result, expected, decimal=5)
def test_set_length_batch_vector(self): result = vector3.set_length([ [1.,1.,1.], [-1.,-1.,-1.], [0.,2.,7.], ], 2.0) expected = [ [1.15470,1.15470,1.15470], [-1.15470,-1.15470,-1.15470], [0.,0.54944,1.92304], ] np.testing.assert_almost_equal(result, expected, decimal=5)
def test_set_length(self): result = vector3.set_length([1., 1., 1.], 2.) expected = [1.15470, 1.15470, 1.15470] np.testing.assert_almost_equal(result, expected, decimal=5)
def test_set_length(self): result = vector3.set_length([1.,1.,1.],2.) expected = [1.15470,1.15470,1.15470] np.testing.assert_almost_equal(result, expected, decimal=5)