vectorA:round
From ComputerCraft Wiki
| Rounds the vector coordinates to the nearest integers and returns the result as a new vector. | |
| Syntax | vector:round() |
| Returns | vector |
| Part of | ComputerCraft |
| API | vector |
Examples
| Rounds a vector and prints the resulting coordinates. | |
| Code |
local a = vector.new(1.4999, 1.5, 3.14) local c = a:round() print(c.x) print(c.y) print(c.z) --1 --2 --3 |