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

rust-geom's Rect::union is patently wrong #128

Closed
burg opened this issue Oct 17, 2012 · 1 comment
Closed

rust-geom's Rect::union is patently wrong #128

burg opened this issue Oct 17, 2012 · 1 comment

Comments

@burg
Copy link

@burg burg commented Oct 17, 2012

Correct version is below, but triggers ICE. Depends on Rust Issue #3790.

    pure fn union(other: &Rect<T>) -> Rect<T> {
        let upper_left = Point2D(min(self.origin.x, other.origin.x),
                                 min(self.origin.y, other.origin.y));

        let lower_right = Point2D(max(self.origin.x + self.size.width,
                                     other.origin.x + other.size.width,
                                  max(self.origin.y + self.size.height,
                                     other.origin.y + other.size.height));

        Rect {
            origin: upper_left,
            size: Size2D(lower_right.x - upper_left.x, lower_right.y - upper_left.y))
        }
}
@burg
Copy link
Author

@burg burg commented Oct 18, 2012

Fixed (more or less).

@burg burg closed this Oct 18, 2012
ChrisParis pushed a commit to ChrisParis/servo that referenced this issue Sep 7, 2014
XHR test bug fixes - second attempt
We are basically done with the review of this full set in https://critic.hoppipolla.co.uk/r/134. Further refinements are to be proceeded bit by bit during the interop.
glennw added a commit to glennw/servo that referenced this issue Jan 16, 2017
Fix the call to `glUniform4f()` when setting the filter parameters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.