interpolation/Cosine/Vector
< Interpolation | Cosine
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: vector fCos( vector x, vector y, float t );
Cosine interpolation between two vectors.
Returns a vector
• vector | x | |||
• vector | y | |||
• float | t |
Specification
<syntaxhighlight lang="lsl2"> vector vCos(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.</syntaxhighlight>
Examples
<syntaxhighlight lang="lsl2"></syntaxhighlight>