Difference between revisions of "Interpolation/Linear/Float"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{LSL_Function |mode=user |func=fLin |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…")
 
m
Line 11: Line 11:
|spec=<lsl>float fLin(float x, float y, float t) {
|spec=<lsl>float fLin(float x, float y, float t) {
     return x*(1-t) + y*t;
     return x*(1-t) + y*t;
}</lsl>
}
// Released into public domain. By Nexii Malthus.</lsl>
|examples=<lsl>float value = fLin(-5, 15, 0.6); // value == 7</lsl>
|examples=<lsl>float value = fLin(-5, 15, 0.6); // value == 7</lsl>
|cat1=Examples
|cat1=Examples
}}
}}

Revision as of 03:37, 14 September 2011