Difference between revisions of "Interpolation/Linear/Float"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
Line 9: Line 9:
|func_desc=[[Image:Interp_Chart1.png|frame|right]]
|func_desc=[[Image:Interp_Chart1.png|frame|right]]
Interpolates between two floating point values in a linear fashion.
Interpolates between two floating point values in a linear fashion.
|spec=<lsl>float fLin(float x, float y, float t) {
|spec=<source lang="lsl2">float fLin(float x, float y, float t) {
     return x*(1-t) + y*t;
     return x*(1-t) + y*t;
}
}
// Released into public domain. By Nexii Malthus.</lsl>
// Released into public domain. By Nexii Malthus.</source>
|examples=<lsl>float value = fLin(-5, 15, 0.6); // value == 7</lsl>
|examples=<source lang="lsl2">float value = fLin(-5, 15, 0.6); // value == 7</source>
|cat1=Examples
|cat1=Examples
}}
}}

Latest revision as of 16:04, 24 January 2015