mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Switch int to int16_t.
This commit is contained in:
parent
0384d43304
commit
67b9a815b3
@ -29,15 +29,15 @@ typedef struct size {
|
||||
} wsize_t;
|
||||
|
||||
typedef struct point {
|
||||
int x;
|
||||
int y;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
} point_t;
|
||||
|
||||
typedef struct rectangle {
|
||||
int x;
|
||||
int y;
|
||||
int w;
|
||||
int h;
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t w;
|
||||
int16_t h;
|
||||
} rectangle_t;
|
||||
|
||||
typedef struct blob {
|
||||
@ -151,12 +151,12 @@ typedef enum interp {
|
||||
} interp_t;
|
||||
|
||||
/* Point functions */
|
||||
point_t *point_alloc(int x, int y);
|
||||
point_t *point_alloc(int16_t x, int16_t y);
|
||||
bool point_equal(point_t *p1, point_t *p2);
|
||||
float point_distance(point_t *p1, point_t *p2);
|
||||
|
||||
/* Rectangle functions */
|
||||
rectangle_t *rectangle_alloc(int x, int y, int w, int h);
|
||||
rectangle_t *rectangle_alloc(int16_t x, int16_t y, int16_t w, int16_t h);
|
||||
bool rectangle_equal(rectangle_t *r1, rectangle_t *r2);
|
||||
bool rectangle_intersects(rectangle_t *r1, rectangle_t *r2);
|
||||
bool rectangle_subimg(image_t *img, rectangle_t *r, rectangle_t *r_out);
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include "imlib.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
point_t *point_alloc(int x, int y)
|
||||
point_t *point_alloc(int16_t x, int16_t y)
|
||||
{
|
||||
point_t *p = xalloc(sizeof(point_t));
|
||||
p->x = x;
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "array.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
rectangle_t *rectangle_alloc(int x, int y, int w, int h)
|
||||
rectangle_t *rectangle_alloc(int16_t x, int16_t y, int16_t w, int16_t h)
|
||||
{
|
||||
rectangle_t *r = xalloc(sizeof(rectangle_t));
|
||||
r->x = x;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user