this is because
1 if not a float and
offsetX has to be one. (and it works in the other case because
-1 are both ints)
It seems godot somehow can't check if the values can be casted or chooses to warn whatsoever.
Doing this removes the warning:
var offsetX: float = 1.0 if (sizeX%2 == 0) else 0.5
I wonder if this should be reported? I find this to be a weird behavior.