Page 3 of 3

Re: Coordinates for lines vs points (and pixel grid alignment for points)

Posted: Tue May 04, 2021 3:41 pm
by darkfrei
pgimeno wrote: Tue May 04, 2021 1:29 pm Can't reproduce. I get 10 both times, not 10.0.

Edit: Ah, it happens in Lua 5.3, which has separate integer and float types. Löve only supports 5.1.
Normal program languages have a lot of data types and the variable cannot change the type of it.

I think that's possible to make such multi-types-data as:
a = {table = {1,2}, bool = true, integer = 4, double = 1.33, string ="some text", type = "integer"}

And the value of it will be called as
value (a) = a[a.type].

Of coarse other types are empty.