Add math.round
and fix vector.round
(#10803)
This commit is contained in:
@@ -3163,6 +3163,7 @@ For the following functions, `v`, `v1`, `v2` are vectors,
|
||||
* Returns a vector, each dimension rounded down.
|
||||
* `vector.round(v)`:
|
||||
* Returns a vector, each dimension rounded to nearest integer.
|
||||
* At a multiple of 0.5, rounds away from zero.
|
||||
* `vector.apply(v, func)`:
|
||||
* Returns a vector where the function `func` has been applied to each
|
||||
component.
|
||||
@@ -3237,6 +3238,8 @@ Helper functions
|
||||
* If the absolute value of `x` is within the `tolerance` or `x` is NaN,
|
||||
`0` is returned.
|
||||
* `math.factorial(x)`: returns the factorial of `x`
|
||||
* `math.round(x)`: Returns `x` rounded to the nearest integer.
|
||||
* At a multiple of 0.5, rounds away from zero.
|
||||
* `string.split(str, separator, include_empty, max_splits, sep_is_pattern)`
|
||||
* `separator`: string, default: `","`
|
||||
* `include_empty`: boolean, default: `false`
|
||||
|
Reference in New Issue
Block a user