AddChild... and Godot hangs

When I need floating point from integers, I multiply first (normally by 100, depending on precision required…), do the integer operation, then divide, to get back to floating point. Converting the opposite way works, too. Just sayin’; hope this helps.

It’s a bit of a party trick but still very illustrative of the problem. Godot formats vector printouts to some limited precision. I don’t know if it’s hardcoded. It gets clearer what is happening if you do:

var foo = Vector2(0.0, 1.0) - Vector2(0.0, 0.9)
var bar = Vector2(0.0, 0.1)
print("%.16v"%foo)
print("%.16v"%bar)

1 Like

Yeah, I get what’s happening, but it is still very funny when you see it! And I am glad they do that on prints, despite the odd edge case. Your example really shows it well though, thanks.