Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a17669
commit 23eaf5d
Showing
8 changed files
with
229 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __SIEGE_UTIL_RECT_H__ | ||
#define __SIEGE_UTIL_RECT_H__ | ||
|
||
#include "../common.h" | ||
#include "vector.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif // __cplusplus | ||
|
||
typedef struct SGRect | ||
{ | ||
SGVec2 a; | ||
SGVec2 b; | ||
} SGRect; | ||
|
||
SGRect SG_CALL sgRect(float x1, float y1, float x2, float y2); | ||
SGRect SG_CALL sgRectWH(float x, float y, float w, float h); | ||
|
||
SGVec2 SG_CALL sgRectSize(SGRect rect); | ||
SGVec2 SG_CALL sgRectCenter(SGRect rect); | ||
SGRect SG_CALL sgRectOffset2f(SGRect rect, float x, float y); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif // __cplusplus | ||
|
||
#endif /* __SIEGE_UTIL_RECT_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.