示例#1
0
    def test_interoplation(self):
        result = vector3.interpolate([0., 0., 0.], [1., 1., 1.], 0.5)
        np.testing.assert_almost_equal(result, [.5, .5, .5], decimal=5)

        result = vector3.interpolate([0., 0., 0.], [2., 2., 2.], 0.5)
        np.testing.assert_almost_equal(result, [1., 1., 1.], decimal=5)
示例#2
0
    def test_interoplation( self ):
        result = vector3.interpolate([0.,0.,0.], [1.,1.,1.], 0.5)
        np.testing.assert_almost_equal(result, [.5,.5,.5], decimal=5)

        result = vector3.interpolate([0.,0.,0.], [2.,2.,2.], 0.5)
        np.testing.assert_almost_equal(result, [1.,1.,1.], decimal=5)