Difference between revisions of "LSL Addition"
Jump to navigation
Jump to search
Void Singer (talk | contribs) m (trying out a different layout to work better with the contents box) |
|||
Line 85: | Line 85: | ||
* '''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''' | * '''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''' | ||
** this is only a sample layout, feel free to suggest other layouts. | ** this is only a sample layout, feel free to suggest other layouts. | ||
** ''I'll write one when I have some time'' -- '''[[User:Strife_Onizuka|Strife]]''' <sup><small>([[User talk:Strife_Onizuka|talk]]|[[Special:Contributions/Strife_Onizuka|contribs]])</small></sup> 22:49, 24 January 2010 (UTC) | |||
}} | }} | ||
[[Category:LSL_Operators]] | [[Category:LSL_Operators]] |
Revision as of 14:49, 24 January 2010
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Integer
- Operation: Addition
- Example:
- 1 + 1
- Result = 2
- Example:
- See Note1
Float
- Operation: Addition
- Example:
- 1.5 + 1.5
- Result = 3.0
- Example:
- See Note1
Vector
- Operation: Addition
- Example:
- <1.0, 1.0, 1.0> + <1.0, 0.0, -1.0>
- Result = <2.0, 1.0, 0.0>
- Example:
Rotation
- Operation: unknown!
- See Note2
String
- Operation: Concatenation (adds to the end of)
- Example:
- "abc" + "def"
- Result = "abcdef"
- See Note3
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"]
Notes
- When one operand is an Integer, and the other is a Float, the Integer is first typecast to Float before addition.
- This operator is rarely used with this type as it is not a meaningful way of combining quaternions being used to represent rotations.
- Use the Multiplication operator instead.
- While Keys are a specialized type of String They cannot be directly used with this operator.
- 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