Core API Reference: Number Interpolation

From Color Infection Wiki

Jump to: navigation, search


Contents


Linear Interpolation

Linear interpolation. result = x1 * t + (1.0 - t) * x2

Input Parameters:

Number x1
one number
Number x2
another number
Factor t
the interpolation factor t

Output Parameters:

Result
x1 * t + (1.0 - t) * x2
Color Linear Interpolation

Color linear interpolation. The operation will apply the formula c1 * t + (1.0 - t) * c2 to all 3 color channels (red, green and blue) separately.

Input Parameters:

Color c1
one color
Color c2
another color
Factor t
the interpolation factor t. The valid value range is between 0.0 and 1.0.

Output Parameters:

Result
the result color
Personal tools