Documentation says Position x/y are ints, but they return floats
Posted: Sun Nov 28, 2021 9:09 am
https://lua-api.factorio.com/latest/Con ... l#Position
Position x and y are documented as being ints, but when I get the player's position, it returns floating point numbers with decimal places.
I suspect I am misunderstanding something because it seems quite basic. I hope someone can clear it up for me! Thanks in advance.
Position x and y are documented as being ints, but when I get the player's position, it returns floating point numbers with decimal places.
Code: Select all
/c local p = game.player p.print(p.position.x.." "..p.position.y)
-0.05078125, 46.48828125
I suspect I am misunderstanding something because it seems quite basic. I hope someone can clear it up for me! Thanks in advance.