Vector2 uses float numbers. x and y are float. Using ints to make one does not determine its type.
% only works on integers.
So if you want to use this operator you must cast to integer:
return point % int(map_size.x)
note if the map_size is not exactly integer sized this will simply cut off anything after the decimal point. which is probably what you want anyway but something to keep in mind.
nonchip | 2020-04-24 15:29
Well this is unexpected, Should’ve checked docs.
I hoped duck typing did all the job for me Thank you!