Difference between revisions of "Category:LSL Vector"
Jump to navigation
Jump to search
DuraS Torok (talk | contribs) (→Vector) |
m (→Vector) |
||
Line 7: | Line 7: | ||
* Position: x, y and z are in metres. | * Position: x, y and z are in metres. | ||
* Velocity: x, y and z represent speeds. | * Velocity: x, y and z represent speeds. | ||
* | * {{LSLGC|Color|Colour}}: Red is x, Green is y and Blue is z. | ||
Vectors support the following operations: | Vectors support the following operations: |
Revision as of 23:43, 20 May 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Vector
A vector is a data type 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 can be used to hold the following:
- Position: x, y and z are in metres.
- Velocity: x, y and z represent speeds.
- Colour: Red is x, Green is y and Blue is z.
Vectors support the following operations:
- Addition, Operator "+"
- Subtraction, Operator "-"
- Multiplication (Dot Product), Operator "*"
- Cross Product, Operator "%"
A vector can be multiplied or divided by a Quaternion to rotate it.
Example
vector test=<1.0, 2.0, 3.0>; llOwnerSay((string)test.z); // Outputs 3.0
Subcategories
This category has the following 2 subcategories, out of 2 total.
Pages in category "LSL Vector"
The following 6 pages are in this category, out of 6 total.