Пример #1
0
    def test_interoplation( self ):
        vec1 = numpy.array( [ 0.0, 0.0, 0.0 ] )
        vec2 = numpy.array( [ 1.0, 1.0, 1.0 ] )

        result = vector.interpolate( vec1, vec2, 0.5 )

        expected = numpy.array( [ 0.5, 0.5, 0.5 ] )

        self.assertTrue(
            numpy.array_equal( result, expected ),
            "Interoplation value incorrect"
            )
Пример #2
0
 def interpolate(self, other, delta):
     return type(self)(vector.interpolate(self, type(self)(other), delta))
Пример #3
0
 def interpolate(self, other, delta):
     return type(self)(vector.interpolate(self, type(self)(other), delta))