<vizmat>.Interpolate

Interpolate two numbers by a given percent

 

<vizmat>.Interpolate(
    begin    
    end    
    percent    

)

 

begin

The beginning number or list of numbers


end

The ending number or list of numbers


percent

The percent to interpolate between the beginning and ending numbers


Remarks

This command will interpolate from the beginning to ending number by the given percentage. If the first two arguments are lists of numbers then this command will interpolate each number in the list and return a list of all the interpolated values.

Return Value

A number or a list of numbers depending on the passed argument.

Example

import vizmat

#Interpolate from 2 to 3 by 0.5 percent
print vizmat.Interpolate(2,3,0.5)

#Output will be 2.5