Fixed Precision
Revision as of 14:57, 24 January 2015 by ObviousAltIsObvious Resident (talk | contribs) (<lsl> tag to <source>)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Function to do fixed precision
Here's a function to do fixed precision.
string fixedPrecision(float input, integer precision)
{
if((precision = (precision - 7 - (precision < 1))) & 0x80000000)
return llGetSubString((string)input, 0, precision);
return (string)input;
}