Difference between revisions of "Interpolation/Cubic/Vector"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{LSL_Function |mode=user |func=vCub |p1_type=vector|p1_name=a |p2_type=vector|p2_name=b |p3_type=vector|p3_name=c |p4_type=vector|p4_name=d |p5_type=float|p5_name=t |return_type…")
 
m (<lsl> tag to <source>)
 
Line 11: Line 11:
|func_desc=
|func_desc=
Cubic interpolation between four vectors.
Cubic interpolation between four vectors.
|spec=<lsl>vector vCub(vector a, vector b, vector c, vector d, float t) {
|spec=<source lang="lsl2">vector vCub(vector a, vector b, vector c, vector d, float t) {
     float P = (d-c)-(a-b);
     float P = (d-c)-(a-b);
     return P*llPow(t,3) + ((a-b)-P)*llPow(t,2) + (c-a)*t + b;
     return P*llPow(t,3) + ((a-b)-P)*llPow(t,2) + (c-a)*t + b;
}
}
// Released into public domain. By Nexii Malthus.</lsl>
// Released into public domain. By Nexii Malthus.</source>
|examples=<lsl></lsl>
|examples=<source lang="lsl2"></source>
|cat1=Examples
|cat1=Examples
}}
}}

Latest revision as of 16:03, 24 January 2015