kotlin-graphics / glm

jvm glm
129 stars 21 forks source link

Add VecXVars interface #28

Closed kyay10 closed 1 year ago

kyay10 commented 1 year ago

These interfaces allow, for instance, using a Vec4 in place of a Vec3 if a function uses the Vec3Vars interface. Initially, I was going to turn VecXt into an interface, but it seemed to cause inconsistent behaviour in terms of the put functions (e.g. if you put with an array of length 2 on a Vec2t, but the value is, in reality, a Vec4, it would cause an exception).

There are a few places in imgui where these interfaces would reduce duplication

elect86 commented 1 year ago

thanks Youssef, that's a nice idea