Interpolation/Cosine/Vector: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
m <lsl> tag to <source>
Gwyneth Llewelyn (talk | contribs)
m Replace <nowiki> & <source> with <syntaxhighlight>
 
Line 9: Line 9:
|func_desc=
|func_desc=
Cosine interpolation between two vectors.
Cosine interpolation between two vectors.
|spec=<source lang="lsl2">vector vCos(float x, float y, float t) {
|spec=<syntaxhighlight lang="lsl2">
vector vCos(float x, float y, float t) {
     float F = (1-llCos(t*PI))/2;
     float F = (1-llCos(t*PI))/2;
     return x*(1-F)+y*F;
     return x*(1-F)+y*F;
}
}
// Released into public domain. By Nexii Malthus.</source>
// Released into public domain. By Nexii Malthus.</syntaxhighlight>
|examples=<source lang="lsl2"></source>
|examples=<syntaxhighlight lang="lsl2"></syntaxhighlight>
|cat1=Examples
|cat1=Examples
}}
}}

Latest revision as of 16:20, 6 May 2025