Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upApply skew transformation for alpha and beta angles. #100
Conversation
src/matrix.rs
Outdated
| pub fn create_skew(sx: f32, sy: f32) -> Matrix4 { | ||
| /// https://drafts.csswg.org/css-transforms/#funcdef-skew | ||
| pub fn create_skew(alpha: f32, beta: f32) -> Matrix4 { | ||
| let (sx, sy) = (beta.tan(), alpha.tan()); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/matrix.rs
Outdated
| /// Create a 2d skew matrix | ||
| pub fn create_skew(sx: f32, sy: f32) -> Matrix4 { | ||
| /// https://drafts.csswg.org/css-transforms/#funcdef-skew | ||
| pub fn create_skew(alpha: f32, beta: f32) -> Matrix4 { |
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 11, 2015
Contributor
We should make sure to bump the version number to 0.2 for this breaking change. It might not matter in this case, but it's a good habit.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 11, 2015
Contributor
I'm having second thoughts about this. No crate outside of Servo uses this function, so it'd create a bunch of busywork for a purely theoretical breakage. Perhaps we can just fudge this as a "bug fix".
src/matrix.rs
Outdated
| @@ -303,8 +303,9 @@ impl Matrix4 { | |||
| ) | |||
| } | |||
|
|
|||
| /// Create a 2d skew matrix | |||
| pub fn create_skew(sx: f32, sy: f32) -> Matrix4 { | |||
| /// https://drafts.csswg.org/css-transforms/#funcdef-skew | |||
This comment has been minimized.
This comment has been minimized.
mbrubeck
Sep 11, 2015
Contributor
I'd prefer to keep the descriptive doc string, and add the link to the body of the comment
This comment has been minimized.
This comment has been minimized.
|
See above for review comments. |
This patch is to fix #6237 in servo.
|
@bors-servo r+ |
|
|
bors-servo
pushed a commit
that referenced
this pull request
Sep 11, 2015
Apply skew transformation for alpha and beta angles. This patch is to fix servo/servo#6238. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/euclid/100) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
nox commentedAug 27, 2015
This patch is to fix servo/servo#6238.