Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

nical
Copy link
Contributor

@nical nical commented Feb 23, 2021

Fixes #475

@nical
Copy link
Contributor Author

nical commented Feb 23, 2021

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

@nical nical requested a review from kvark February 23, 2021 20:28
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason to not just implement Mul?

@nical
Copy link
Contributor Author

nical commented Feb 24, 2021

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
Copy link
Contributor Author

nical commented Feb 24, 2021

@bors-servo r=kvark

@bors-servo
Copy link
Contributor

📌 Commit 2e0285c has been approved by kvark

@bors-servo
Copy link
Contributor

⌛ Testing commit 2e0285c with merge 269e325...

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-travis
Approved by: kvark
Pushing 269e325 to master...

@bors-servo bors-servo merged commit 269e325 into servo:master Feb 24, 2021
@nical nical deleted the component_mul branch February 24, 2021 16:53
bors-servo added a commit that referenced this pull request Apr 12, 2021
Add component-wise division of 2d and 3d vectors

Partial fix for #480.

See also #476 for the implementation of component_mul.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component-wise multiplication for Vector2
3 participants