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

Rename Rect2 and Rect2i clip() to intersection() #44521

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

madmiraal
Copy link
Contributor

As originally identified here, Rect2 and Rect2i's method clip() is the same as 3D's AABB's method intersection(). These methods should have the same name. This PR renames Rect2 and Rect2i's method clip() to intersection(), because, although the method can be used to clip a rectangle, it doesn't clip the current rectangle. Instead, it returns the intersection between this rectangle and another rectangle. Even the current documentation describes it as such:

Returns the intersection of this Rect2 and b.

Part of #16863.

@akien-mga akien-mga merged commit e9d12f9 into godotengine:master Dec 19, 2020
@akien-mga
Copy link
Member

Thanks!

@madmiraal madmiraal deleted the rename-rect2-clip branch December 20, 2020 08:41
@aaronfranke
Copy link
Member

aaronfranke commented Dec 22, 2020

Should also be done for C#.

EDIT: #44582

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

Successfully merging this pull request may close these issues.

3 participants