LSL Addition
Revision as of 10:31, 4 January 2012 by Strife Onizuka (talk | contribs) (This shouldn't be in flow control, it doesn't control flow.)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Integer
- Operation: Addition
- Example:
- 1 + 1
- Result = 2
- Example:
Float
- Operation: Addition
- Example:
- 1.5 + 1.5
- Result = 3.0
- Example:
Vector
- Operation: Addition
- Examples:
- <1.0, 1.0, 1.0> + <1.0, 0.0, -1.0>
- Result = <2.0, 1.0, 0.0>
- Action: <a.x, a.y, a.z> + <b.x, b.y, b.z> == <a.x + b.x, a.y + b.y, a.z + b.z>
- <-1.0, 0.0, 1.0> + 1.0
- Result: <0.0, 1.0, 2.0>
- Action: <a.x, a.y, a.z> + b == <a.x + b, a.y + b, a.z + b>
- Examples:
Rotation
- Operation: unknown!
String
List
- Operation: Concatenation (adds to the end of)
- Example:
- [0, 0.0, <0.0, 0.0, 0.0>, ""] + [1, 1.0, <1.0, 1.0, 1.0>, "xyz"]
- Result: [0, 0.0, <0.0, 0.0, 0.0>, "", 1, 1.0, <1.0, 1.0, 1.0>, "xyz"]
- list + value = [contents_of_list, value]
Notes
- needs link for article about min/max integer/float values
- needs link for article about max string and list lengths
- It'd be helpful if someone wrote a template for this page so that it might be abstracted to other operators after layout is finalized