kevinw / raylib-odin

Odin bindings for the raylib gamedev library
The Unlicense
36 stars 3 forks source link

create bindings for raymath #1

Closed Skytrias closed 5 years ago

Skytrias commented 5 years ago

The bindings for raylib are awesome so far, they work besides the missing implementations of raymath. I think theyre the most important to add to get people to use these bindings.

Since odin has vec2 and mat4 as well you said you had to decide which one to use, either odins or raylibs implementation.

I'd you should just bind the raymath implementation since it also has some functions the odin math doesnt have like clamp or perpendicular vector2/vector3.

kevinw commented 5 years ago

Added bindings in dfc0c5e5551af64460da809e264a20312632cd86.

That commit also makes Vector2, Vector3, Vector4, and Matrix all aliases for the odin core/math types, so we have the best of both worlds--you can use core/math functions, or raylib functions.

See examples/example_raymath/example_raymath.odin for how to use!