Adding the rect_to_frect function.
This commit is contained in:
parent
520a846892
commit
7121b6d084
|
|
@ -46,7 +46,7 @@ typedef SDL_FRect frect_t;
|
|||
|
||||
#define is_not_zero(X) (fabsf(X) > EPSILON)
|
||||
|
||||
void rect_to_frect(const rect_t rect, frect_t frect);
|
||||
void rect_to_frect(const rect_t *rect, frect_t *frect);
|
||||
|
||||
void frect_to_rect(const frect_t *frect, rect_t *rect);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
#include "vector2d.h"
|
||||
|
||||
void rect_to_frect(const rect_t *rect, frect_t *frect)
|
||||
{
|
||||
frect->x = (float)rect->x;
|
||||
frect->y = (float)rect->y;
|
||||
frect->w = (float)rect->w;
|
||||
frect->h = (float)rect->h;
|
||||
}
|
||||
|
||||
void frect_to_rect(const frect_t *frect, rect_t *rect)
|
||||
{
|
||||
rect->x = (int)frect->x;
|
||||
|
|
|
|||
Loading…
Reference in New Issue