Closed alexkirsz closed 3 years ago
Hi,
Sounds good to me. I suspect that the need hasn't shown up enough for someone to add the API but it makes sense.
I'm wondering if in addition to a properly explicit function like component_mul
, adding a Mul
operator would make sense. I'm used to having it in glsl.
@nical Thanks for the quick implementation!
I think it would make sense to also have component-wise division, as well as component-wise ceiling division for integer types.
See:
Hey,
I don't see an obvious way to do component-wise multiplication and division for Vector2-like types. Is this a deliberate API decision or just a use case that hasn't showed up?
Example usage:
See also: https://docs.rs/nalgebra/0.24.1/nalgebra/base/struct.Matrix.html#method.component_mul
Cheers, Alex