Difference between revisions of "Vector"
Jump to navigation
Jump to search
Gigs Taggart (talk | contribs) (stub) |
|||
Line 1: | Line 1: | ||
[[Category:LSL_Types|vector]] | {{LSL Header}} | ||
==Vector== | |||
A datatype that contains a set of three [[LSL_Float|float]] values. Each element can be accessed individually by appending .x, .y, or .z to the variable name. | |||
Vectors support the following operations: | |||
* Addition, Operator "+" | |||
* Subtraction, Operator "-" | |||
* Multiplication (Dot Product), Operator "*" | |||
* Cross Product, Operator "%" | |||
A vector can be multiplied with a [[LSL_Quaternion|Quaternion]] to rotate it. | |||
===Example=== | |||
<pre> | |||
vector test=<1.0, 2.0, 3.0>; | |||
llOwnerSay((string)test.z); // Outputs 3.0 | |||
</pre> | |||
[[Category:LSL_Types|vector]][[Category:LSL_Stub]] |
Revision as of 16:05, 11 February 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Vector
A datatype that contains a set of three float values. Each element can be accessed individually by appending .x, .y, or .z to the variable name.
Vectors support the following operations:
- Addition, Operator "+"
- Subtraction, Operator "-"
- Multiplication (Dot Product), Operator "*"
- Cross Product, Operator "%"
A vector can be multiplied with a Quaternion to rotate it.
Example
vector test=<1.0, 2.0, 3.0>; llOwnerSay((string)test.z); // Outputs 3.0