2023-07-02 00:59:02 +02:00
|
|
|
# Class: vec3
|
|
|
|
|
|
|
|
Class representing a 3D vector.
|
|
|
|
|
|
|
|
## Fields (3)
|
|
|
|
|
|
|
|
### `x`
|
|
|
|
|
|
|
|
x component of the vector.
|
|
|
|
|
|
|
|
- Type: `float`
|
|
|
|
|
|
|
|
### `y`
|
|
|
|
|
|
|
|
y component of the vector.
|
|
|
|
|
|
|
|
- Type: `float`
|
|
|
|
|
|
|
|
### `z`
|
|
|
|
|
|
|
|
z component of the vector.
|
|
|
|
|
|
|
|
- Type: `float`
|
|
|
|
|
|
|
|
## Constructors (1)
|
|
|
|
|
|
|
|
### `new(x, y, z)`
|
|
|
|
|
2024-08-14 06:40:09 +00:00
|
|
|
Returns: vec3: a vector that contains the x, y, and z values.
|
2023-07-02 00:59:02 +02:00
|
|
|
|
|
|
|
- **Parameters:**
|
|
|
|
- `x` (float): x component of the vector.
|
|
|
|
- `y` (float): y component of the vector.
|
|
|
|
- `z` (float): z component of the vector.
|
|
|
|
|
2023-07-05 00:30:57 +02:00
|
|
|
**Example Usage:**
|
2023-07-02 00:59:02 +02:00
|
|
|
```lua
|
|
|
|
myInstance = vec3:new(x, y, z)
|
|
|
|
```
|
|
|
|
|