Example #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"
            )
Example #2
0
 def interpolate(self, other, delta):
     return type(self)(vector.interpolate(self, type(self)(other), delta))
Example #3
0
File: base.py Project: RazerM/Pyrr
 def interpolate(self, other, delta):
     return type(self)(vector.interpolate(self, type(self)(other), delta))