Remix.run Logo
WhereIsTheTruth a day ago

I'll take this:

    Vec2 result = translation + (rotationMatrix * (scalingMatrix * point));

Over this:

    const result = vec2Add(translation, mat2MulVec2(rotationMatrix, mat2MulVec2(scalingMatrix, point)));
Anytime

And that's a very simple example, in Zig, that kind of equations doesn't scale well, when it comes to readability

ioasuncvinvaer a day ago | parent [-]

A problem that I always run into with code using * for multiplication of matrices is which operation they use. Is it element wise or a matrix multiplication?