interpolation/Cosine/Float
< Interpolation | Cosine
Jump to navigation
Jump to search
Revision as of 03:43, 14 September 2011 by Nexii Malthus (talk | contribs) (Created page with "{{LSL_Function |mode=user |func=fCos |p1_type=float|p1_name=x |p2_type=float|p2_name=y |p3_type=float|p3_name=t |return_type=float |return_value=returns the interpolation between…")
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
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
<lsl>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.</lsl>
Examples
<lsl></lsl>