math.roundVec3
math.roundVec3(vec, digits)
Arguments
| Argument | Data Type | Optional | Default Value | Explanation | 
| value | float | No | - | Number in decimals | 
| numDecimalPlaces | int | Yes | 0 | Sets the rounding of the number | 
Example
local value = vector3(-269.444, -955.333, 31.222)
print('value: ' .. value) -- Returns -269.4, -955.3, 31.2
print('value rounded: ' .. math.roundVec3(value)) -- Returns -269, -955, 31
print('value rounded: ' .. math.roundVec3(value, 1)) -- Returns -269.4, -955.3, 31.2
print('value rounded: ' .. math.roundVec3(value, 2)) -- Returns -269.44, -955.33, 31.22
Improve this documentation