mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Merge pull request #1 from kalrnlo/master
Edits to align better with the existing math lib, and add functions from the math lib that would also be useful for vectors
This commit is contained in:
commit
4e6b581640
1 changed files with 16 additions and 4 deletions
|
@ -52,13 +52,25 @@ Equivalent of `math.ceil` for vectors.
|
|||
|
||||
Returns the angle between two vectors in radians.
|
||||
|
||||
`vector.max(input: vector, maximum: vector): vector`
|
||||
`vector.abs(vec: vector): vector`
|
||||
|
||||
Applies math.max component-wise for each vector. Equivalent of: `vector(math.max(a.x, b.x), etc)`
|
||||
Applies math.abs component-wise for each vector. Equivalent of: `vector(math.abs(vec.x), ect)`
|
||||
|
||||
`vector.min(input: vector, minimum: vector): vector`
|
||||
`vector.sign(vec: vector): vector`
|
||||
|
||||
Same as `vector.max`. Equivalent of: `vector(math.min(a.x, b.x), etc)`
|
||||
Applies math.sign component-wise for each vector. Equivalent of: `vector(math.sign(vec.x), ect)`
|
||||
|
||||
`vector.clamp(vec: vector, min: vector, max: vector): vector`
|
||||
|
||||
Applies math.clamp component-wise for each vector. Equivalent of: `vector(math.clamp(vec.x, min.x, max.x), ect)`
|
||||
|
||||
`vector.max(list: ...vector): vector`
|
||||
|
||||
Finds the highest vector xyz in the list of vectors provided and returns a new vector with its xyz being those highest values
|
||||
|
||||
`vector.min(list: ...vector): vector`
|
||||
|
||||
Inverse of `vector.min` where instead of looking for the highest it looks for the lowest
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue