janet-lang / jaylib

Janet bindings to Raylib
MIT License
137 stars 36 forks source link

jaylib_wrap_vec2: don't truncate floats to integers #24

Closed ianthehenry closed 2 years ago

ianthehenry commented 2 years ago

This might technically be a breaking change, but I think it's a pretty important bugfix.

Raylib's Vector2 contains two floats, but Jaylib truncates those to integers when it returns them (note that they are parsed as floats correctly).

This can lead to some pretty confusing behavior -- not necessarily with any of the currently implemented functions that return vectors, but this prohibits wrapping some other Raylib functions that do not always return integers.