11.07.2015 Views

Linden Scripting Language Guide - Engineering Center

Linden Scripting Language Guide - Engineering Center

Linden Scripting Language Guide - Engineering Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.3. TypesChapter 3. BasicsVariables, return values, and parameters have type information. LSL provides a small set of basic types that areused througout the language.LSL TypesintegerfloatA signed, 32-bit integer value with valid range from -2147483648 to 2147483647.An IEEE 32-bit floating point value with values ranging from 1.175494351E-38 to 3.402823466E+38.keyA unique identifier that can be used to reference objects and agents in Second Life.vector3 floats that are used together as a single item. A vector can be used to represent a 3 dimensional position,direction, velocity, force, impulse, or a color. Each component can be accessed via ’.x’, ’.y’, and ’.z’.Table 3-4. Vector Arithmetic OperatorsOperatorMeaning+ Add two vectors together- Subract one vector from another* Vector dot product% Vector cross productrotation4 floats that are used together as a single item to represent a roation. This data is interpreted as a quaternion.Each compnent can be accessed via ’.x’, ’.y’, ’.z’, and ’.w’.Table 3-5. Rotation Arithmetic OperatorsOperatorMeaning+ Add two rotations together- Subract one rotation from another* Rotate the first rotation by the second/ Rotate the first rotation by the inverse of the secondlistA heterogeneous list of the other data types. Lista are created via comma separated values of the other datatypes enclosed by ’[’ and ’]’.8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!