interpolation/Cosine/Float

Summary

Function: float fCos( float x, float y, float t );

Cosine interpolation between two floating point values.
Returns a float

• float x
• float y
• float t

Specification

float fCos(float x, float y, float t) {
    float F = (1-llCos(t*PI))/2;
    return x*(1-F)+y*F;
}
// Released into public domain. By Nexii Malthus.

Examples