yet another api rework, removal of integer types in public api, optionals at the end, some cleaning
This commit is contained in:
@ -52,19 +52,10 @@
|
||||
#endif /* TWN_NOT_C */
|
||||
|
||||
/* calculates the overlap of two rectangles */
|
||||
TWN_API Recti overlap_recti(const Recti a, const Recti b);
|
||||
TWN_API Rect overlap_rect(const Rect a, const Rect b);
|
||||
|
||||
TWN_API Rect rect_overlap(Rect a, Rect b);
|
||||
/* returns true if two rectangles are intersecting */
|
||||
TWN_API bool intersect_recti(const Recti a, const Recti b);
|
||||
TWN_API bool intersect_rect(const Rect a, const Rect b);
|
||||
|
||||
/* TODO: generics and specials (see m_vec2_from() for an example)*/
|
||||
TWN_API Recti to_recti(Rect rect);
|
||||
TWN_API Rect to_rect(Recti rect);
|
||||
|
||||
TWN_API Vec2i center_recti(Recti rect);
|
||||
TWN_API Vec2 center_rect(Rect rect);
|
||||
TWN_API bool rect_intersects(Rect a, Rect b);
|
||||
TWN_API Vec2 rect_center(Rect rect);
|
||||
|
||||
/* decrements an integer value, stopping at 0 */
|
||||
/* meant for tick-based timers in game logic */
|
||||
|
Reference in New Issue
Block a user