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 upHandle infinite length during normalizing a vector. #297
Conversation
|
@nical could you please review this? Bug 1467277 needs this patch to generate a correct rotate transform matrix in some special cases. |
|
I'm not sure the workflow if I'd like to update euclid and gecko, so I guess I need to create this PR, and then update servo/components/style/Cargo.toml, and then revender rust (or say bump the version?) in Gecko side. |
|
Nice cacth! For updates I am not sure about the specifics of the style system, but since your PR doesn't introduce a breaking change, I think that all we need is to:
When there is a breaking change we first need to go through all of the gecko crates that depend on euclid and update their version of euclid before we can do the steps above, which is a bit of a pain. |
|
Cool! OK, let's add another method, |
9a303ef
to
58b40dc
|
I updated this. @nical, couold you please check again? Thanks for the help. |
|
Neat! @bors-servo r+ |
|
|
Handle infinite length during normalizing a vector. Rotate3d may use some extremely large value in the rotate axis vector, and this may cause infinite length, so the normalized vector becomes a zero vector. Here, we scale the vector first if its length is infinite, and then do the normalization. <!-- 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/297) <!-- Reviewable:end -->
|
|
BorisChiou commentedJul 7, 2018
•
edited by larsbergstrom
Rotate3d may use some extremely large value in the rotate axis vector, and
this may cause infinite length, so the normalized vector becomes a zero vector.
Here, we scale the vector first if its length is infinite, and then do the normalization.
This change is