Anonymous

Not logged in

  • Log in
Second Life Wiki

Fixed Precision

From Second Life Wiki

Namespaces

  • Page
  • Discussion

More

  • More
  • Languages

Page actions

  • Read
  • View source
  • History

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/fr Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ja Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/th Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

/LSL
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;
}
Retrieved from "https://wiki.secondlife.com/w/index.php?title=Fixed_Precision&oldid=1194811"
Categories:
  • Pages using deprecated source tags
  • LSL Examples
Hidden categories:
  • Needs Translation/LSL/de
  • Needs Translation/LSL/es
  • Needs Translation/LSL/el
  • Needs Translation/LSL/fr
  • Needs Translation/LSL/he
  • Needs Translation/LSL/it
  • Needs Translation/LSL/ja
  • Needs Translation/LSL/ko
  • Needs Translation/LSL/nl
  • Needs Translation/LSL/hu
  • Needs Translation/LSL/no
  • Needs Translation/LSL/da
  • Needs Translation/LSL/sv
  • Needs Translation/LSL/tr
  • Needs Translation/LSL/pl
  • Needs Translation/LSL/pt
  • Needs Translation/LSL/ru
  • Needs Translation/LSL/th
  • Needs Translation/LSL/uk
  • Needs Translation/LSL/zh-Hans
  • Needs Translation/LSL/zh-Hant

Navigation

Navigation

  • About & Help
  • Editing Guidelines
  • Main Page
  • Recent Changes
  • Advanced Search

other sites

  • Knowledge Base
  • Blogs & Forums
  • secondlife.com
  • Feedback Portal
  • Support Portal

Wiki tools

Wiki tools

    Page tools

    Page tools

      User page tools

        More

        • What links here
        • Related changes
        • Printable version
        • Permanent link
        • Page information
        • Page logs

        Other projects

        In other languages

        • English

        Categories

        Categories

        • Pages using deprecated source tags
        • LSL Examples

        Hidden categories

        • Needs Translation/LSL/de
        • Needs Translation/LSL/es
        • Needs Translation/LSL/el
        • Needs Translation/LSL/fr
        • Needs Translation/LSL/he
        • Needs Translation/LSL/it
        • Needs Translation/LSL/ja
        • Needs Translation/LSL/ko
        • Needs Translation/LSL/nl
        • Needs Translation/LSL/hu
        • Needs Translation/LSL/no
        • Needs Translation/LSL/da
        • Needs Translation/LSL/sv
        • Needs Translation/LSL/tr
        • Needs Translation/LSL/pl
        • Needs Translation/LSL/pt
        • Needs Translation/LSL/ru
        • Needs Translation/LSL/th
        • Needs Translation/LSL/uk
        • Needs Translation/LSL/zh-Hans
        • Needs Translation/LSL/zh-Hant
        • Creative Commons Attribution-Share Alike 3.0
        • Powered by MediaWiki
        • This page was last edited on 24 January 2015, at 13:57.
        • Content is available under Creative Commons Attribution-Share Alike 3.0 unless otherwise noted.
        • Privacy policy
        • About Second Life Wiki
        • Terms of Use