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 cast function for transform2d/3d. #230

Merged
merged 2 commits into from Oct 16, 2017
Merged

Conversation

@mephisto41
Copy link
Contributor

mephisto41 commented Oct 16, 2017

This change is Reviewable

@mephisto41
Copy link
Contributor Author

mephisto41 commented Oct 16, 2017

r? @nical

@nical
Copy link
Collaborator

nical commented Oct 16, 2017

Thanks! @bors-servo r+

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

📌 Commit 2b99227 has been approved by nical

@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

Testing commit 2b99227 with merge c14db58...

bors-servo added a commit that referenced this pull request Oct 16, 2017
Add cast function for transform2d/3d.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/230)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Oct 16, 2017

☀️ Test successful - status-travis
Approved by: nical
Pushing c14db58 to master...

@bors-servo bors-servo merged commit 2b99227 into servo:master Oct 16, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
impl<T0: NumCast + Copy, Src, Dst> TypedTransform3D<T0, Src, Dst> {
/// Cast from one numeric representation to another, preserving the units.
pub fn cast<T1: NumCast + Copy>(&self) -> Option<TypedTransform3D<T1, Src, Dst>> {
match (NumCast::from(self.m11), NumCast::from(self.m12),

This comment has been minimized.

@kvark

kvark Oct 16, 2017

Member

I wonder if it would be easier somehow to extract the vectors from a matrix, cast them (it's already there), and compose a new matrix from vectors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.