Methods
(static) add(a, b) → {Array}
Add
Parameters:
Name | Type | Description |
---|---|---|
a |
Array | First vector |
b |
Array | Second vector |
Returns:
- Type
- Array
(static) cross(a, b) → {Array}
Cross product
Parameters:
Name | Type | Description |
---|---|---|
a |
Array | First vector |
b |
Array | Second vector |
Returns:
- Type
- Array
(static) dot(a, b) → {Number}
Dot product
Parameters:
Name | Type | Description |
---|---|---|
a |
Array | Vector |
b |
Array | Vector |
Returns:
- Type
- Number
(static) length(v) → {Number}
Length of vector
Parameters:
Name | Type | Description |
---|---|---|
v |
Array | Vector |
Returns:
- Type
- Number
(static) normalize(v) → {Array}
Normalize a vector
Parameters:
Name | Type | Description |
---|---|---|
v |
Array | Vector |
Returns:
- Type
- Array
(static) subtract(a, b) → {Array}
Subtract
Parameters:
Name | Type | Description |
---|---|---|
a |
Array | First vector |
b |
Array | Second vector |
Returns:
- Type
- Array