سؤال

I am using two math libraries in a game project. One is the GLM library and the other one is the math part of Box2D. Occasionally conversion between the two is necessary, like this:

b2Vec2 vec1(1.0f, 1.0f);
glm::vec2 vec2(vec1.x, vec1.y);

I am wondering if there is a better approach to do it more seamlessly, without editing either library?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top