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

SDL API renaming: SDL_rect.h #6887

Closed
slouken opened this issue Dec 23, 2022 · 4 comments
Closed

SDL API renaming: SDL_rect.h #6887

slouken opened this issue Dec 23, 2022 · 4 comments

Comments

@slouken
Copy link
Collaborator

slouken commented Dec 23, 2022

Here are proposed name changes for functions in SDL_rect.h, per discussion in #6569

SDL_EncloseFPoints => SDL_GetRectEnclosingPointsF
SDL_EnclosePoints => SDL_GetRectEnclosingPoints
SDL_FRectEmpty => SDL_IsRectEmptyF
SDL_FRectEqualsEpsilon => SDL_AreRectsEqualF
SDL_FRectEqualsEpsilon => SDL_AreRectsEqualWithinEpsilon
SDL_HasIntersection => SDL_HasRectIntersection
SDL_HasIntersectionF => SDL_HasRectIntersectionF
SDL_IntersectFRect => SDL_GetRectIntersectionF
SDL_IntersectFRectAndLine => SDL_GetRectAndLineIntersectionF
SDL_IntersectRect => SDL_GetRectIntersection
SDL_IntersectRectAndLine => SDL_GetRectAndLineIntersection
SDL_PointInFRect => SDL_IsPointInRectF
SDL_PointInRect => SDL_IsPointInRect
SDL_RectEmpty => SDL_IsRectEmpty
SDL_RectEquals => SDL_AreRectsEqual
SDL_UnionFRect => SDL_GetRectUnionF
SDL_UnionRect => SDL_GetRectUnion

@libsdl-org/a-team for discussion

@icculus
Copy link
Collaborator

icculus commented Dec 27, 2022

SDL_HasRectIntersection -> SDL_DoRectsIntersect ...? I don't feel strongly about it, just throwing it out there.

@slouken
Copy link
Collaborator Author

slouken commented Dec 27, 2022

SDL_HasRectIntersection -> SDL_DoRectsIntersect ...? I don't feel strongly about it, just throwing it out there.

I considered that, but I thought the symmetry with SDL_Has* vs SDL_Get* was nice.

@slouken
Copy link
Collaborator Author

slouken commented Dec 27, 2022

@libsdl-org/a-team, of all of the renaming proposals this one feels the most clunky. Thoughts?

@1bsyl
Copy link
Contributor

1bsyl commented Dec 27, 2022

but that should be SDL_GetRectsIntersection ?
ops, no.
edit: SDL_HasRectIntersection sounds better
or some "SDL_Is..."

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

No branches or pull requests

3 participants