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

Merge adding Rect.Intersects(Rect)bool function #204

Merged
merged 4 commits into from
Nov 5, 2019

Conversation

Tskken
Copy link
Contributor

@Tskken Tskken commented Nov 5, 2019

This merge adds the new Rect.Intersects(Rect)bool function.

Tskken and others added 3 commits November 5, 2019 01:04
Merge faiface/pixel version to Tskken/pixel
This addes a new Rect.Intersects method which is around 5x faster then Rect.Intersect when used for basic collision checks.
Fixed error for forgeting to change benchark function from IsIntersect to Intersects.
Copy link
Owner

@faiface faiface left a comment

Choose a reason for hiding this comment

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

One typo

geometry.go Outdated
@@ -622,6 +622,17 @@ func (r Rect) Intersect(s Rect) Rect {
return t
}

// Intersects returns whether or not the given Rect intersects at any point with this Rect.
//
// This function is overall about 5x faster then Intersect, so it is better
Copy link
Owner

Choose a reason for hiding this comment

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

*than

fixed typo in comments.
@faiface
Copy link
Owner

faiface commented Nov 5, 2019

Okay, merging! Thanks a lot for this!

@faiface faiface merged commit 853405f into faiface:master Nov 5, 2019
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.

None yet

2 participants