Difference between revisions of "Fixed Precision"

From Second Life Wiki
Jump to navigation Jump to search
m
m (<lsl> tag to <source>)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL Header}}
{{LSL Header|ml=*}}


== Function to do fixed precision ==
== Function to do fixed precision ==
Here's a function to do fixed precision.
Here's a function to do fixed precision.


<pre>
<source lang="lsl2">
string fixedPrecision(float input, integer precision)
string fixedPrecision(float input, integer precision)
{
{
Line 11: Line 11:
     return (string)input;
     return (string)input;
}
}
</pre>
</source>


{{LSLC|Examples|Fixed Precision}}
{{LSLC|Examples|Fixed Precision}}
{{#vardefine:sort|Fixed Precision}}

Latest revision as of 14:57, 24 January 2015