Closed mreinstein closed 6 months ago
Sounds good to me. Is a similar function needed for vec3
and/or vec4
?
vec3, most definitely.
I'd also love to see quaternions added but I have almost no experience with them 😅 so I've avoided adding them.
yeah I've been working exclusively in 2D land for quite some time, so I hear you there.
I might take a peek at gl-matrix and look at it's implementation because I don't think internally it uses any matrices, and it should port over without (any?) modification, save for the optional out parameter being at the end.
it should port over without (any?) modification
gl-matrix is fn(out, arg, arg, arg)
wgpu-matrix is fn(arg, arg, arg, out?)
But otherwise, yea, if it's not using matrices then it should work.
@greggman gl-matrix has a way to rotate a 2d point by another point representing the origin. Would you be open to a PR for this?