servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 102 forks source link

Add component-wise multiplication of 2d and 3d vectors #476

Closed nical closed 3 years ago

nical commented 3 years ago

Fixes #475

nical commented 3 years ago

I didn't add a Mul operator à la glsl in this PR, but we might decide to add one later.

nical commented 3 years ago

Not really, I'm fine with adding the operator as well and sort of expecting to add it soon. I just wasn't 100% sure whether there would be consensus around it so I meant to leave the idea hanging for a little bit longer before adding it. I'm in favor (mostly because of familarity with glsl). It looks like neither cgmath and nalgebra implement the mul operator.

nical commented 3 years ago

@bors-servo r=kvark

bors-servo commented 3 years ago

:pushpin: Commit 2e0285c has been approved by kvark

bors-servo commented 3 years ago

:hourglass: Testing commit 2e0285cfbf7ccd37d56d185dc185e246a548e8a7 with merge 269e325720d6a6e0766a91de65ace25574958628...

bors-servo commented 3 years ago

:sunny: Test successful - checks-travis Approved by: kvark Pushing 269e325720d6a6e0766a91de65ace25574958628 to master...