New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -52,51 +52,47 @@ static inline void vec2_copy(struct vec2 *dst, const struct vec2 *v)
|
|||
}
|
||||
|
||||
static inline void vec2_add(struct vec2 *dst, const struct vec2 *v1,
|
||||
const struct vec2 *v2)
|
||||
const struct vec2 *v2)
|
||||
{
|
||||
vec2_set(dst, v1->x+v2->x, v1->y+v2->y);
|
||||
vec2_set(dst, v1->x + v2->x, v1->y + v2->y);
|
||||
}
|
||||
|
||||
static inline void vec2_sub(struct vec2 *dst, const struct vec2 *v1,
|
||||
const struct vec2 *v2)
|
||||
const struct vec2 *v2)
|
||||
{
|
||||
vec2_set(dst, v1->x-v2->x, v1->y-v2->y);
|
||||
vec2_set(dst, v1->x - v2->x, v1->y - v2->y);
|
||||
}
|
||||
|
||||
static inline void vec2_mul(struct vec2 *dst, const struct vec2 *v1,
|
||||
const struct vec2 *v2)
|
||||
const struct vec2 *v2)
|
||||
{
|
||||
vec2_set(dst, v1->x*v2->x, v1->y*v2->y);
|
||||
vec2_set(dst, v1->x * v2->x, v1->y * v2->y);
|
||||
}
|
||||
|
||||
static inline void vec2_div(struct vec2 *dst, const struct vec2 *v1,
|
||||
const struct vec2 *v2)
|
||||
const struct vec2 *v2)
|
||||
{
|
||||
vec2_set(dst, v1->x/v2->x, v1->y/v2->y);
|
||||
vec2_set(dst, v1->x / v2->x, v1->y / v2->y);
|
||||
}
|
||||
|
||||
static inline void vec2_addf(struct vec2 *dst, const struct vec2 *v,
|
||||
float f)
|
||||
static inline void vec2_addf(struct vec2 *dst, const struct vec2 *v, float f)
|
||||
{
|
||||
vec2_set(dst, v->x+f, v->y+f);
|
||||
vec2_set(dst, v->x + f, v->y + f);
|
||||
}
|
||||
|
||||
static inline void vec2_subf(struct vec2 *dst, const struct vec2 *v,
|
||||
float f)
|
||||
static inline void vec2_subf(struct vec2 *dst, const struct vec2 *v, float f)
|
||||
{
|
||||
vec2_set(dst, v->x-f, v->y-f);
|
||||
vec2_set(dst, v->x - f, v->y - f);
|
||||
}
|
||||
|
||||
static inline void vec2_mulf(struct vec2 *dst, const struct vec2 *v,
|
||||
float f)
|
||||
static inline void vec2_mulf(struct vec2 *dst, const struct vec2 *v, float f)
|
||||
{
|
||||
vec2_set(dst, v->x*f, v->y*f);
|
||||
vec2_set(dst, v->x * f, v->y * f);
|
||||
}
|
||||
|
||||
static inline void vec2_divf(struct vec2 *dst, const struct vec2 *v,
|
||||
float f)
|
||||
static inline void vec2_divf(struct vec2 *dst, const struct vec2 *v, float f)
|
||||
{
|
||||
vec2_set(dst, v->x/f, v->y/f);
|
||||
vec2_set(dst, v->x / f, v->y / f);
|
||||
}
|
||||
|
||||
static inline void vec2_neg(struct vec2 *dst, const struct vec2 *v)
|
||||
|
|
@ -106,12 +102,12 @@ static inline void vec2_neg(struct vec2 *dst, const struct vec2 *v)
|
|||
|
||||
static inline float vec2_dot(const struct vec2 *v1, const struct vec2 *v2)
|
||||
{
|
||||
return v1->x*v2->x + v1->y*v2->y;
|
||||
return v1->x * v2->x + v1->y * v2->y;
|
||||
}
|
||||
|
||||
static inline float vec2_len(const struct vec2 *v)
|
||||
{
|
||||
return sqrtf(v->x*v->x + v->y*v->y);
|
||||
return sqrtf(v->x * v->x + v->y * v->y);
|
||||
}
|
||||
|
||||
static inline float vec2_dist(const struct vec2 *v1, const struct vec2 *v2)
|
||||
|
|
@ -121,8 +117,7 @@ static inline float vec2_dist(const struct vec2 *v1, const struct vec2 *v2)
|
|||
return vec2_len(&temp);
|
||||
}
|
||||
|
||||
static inline void vec2_minf(struct vec2 *dst, const struct vec2 *v,
|
||||
float val)
|
||||
static inline void vec2_minf(struct vec2 *dst, const struct vec2 *v, float val)
|
||||
{
|
||||
if (v->x < val)
|
||||
dst->x = val;
|
||||
|
|
@ -131,7 +126,7 @@ static inline void vec2_minf(struct vec2 *dst, const struct vec2 *v,
|
|||
}
|
||||
|
||||
static inline void vec2_min(struct vec2 *dst, const struct vec2 *v,
|
||||
const struct vec2 *min_v)
|
||||
const struct vec2 *min_v)
|
||||
{
|
||||
if (v->x < min_v->x)
|
||||
dst->x = min_v->x;
|
||||
|
|
@ -139,8 +134,7 @@ static inline void vec2_min(struct vec2 *dst, const struct vec2 *v,
|
|||
dst->y = min_v->y;
|
||||
}
|
||||
|
||||
static inline void vec2_maxf(struct vec2 *dst, const struct vec2 *v,
|
||||
float val)
|
||||
static inline void vec2_maxf(struct vec2 *dst, const struct vec2 *v, float val)
|
||||
{
|
||||
if (v->x > val)
|
||||
dst->x = val;
|
||||
|
|
@ -149,7 +143,7 @@ static inline void vec2_maxf(struct vec2 *dst, const struct vec2 *v,
|
|||
}
|
||||
|
||||
static inline void vec2_max(struct vec2 *dst, const struct vec2 *v,
|
||||
const struct vec2 *max_v)
|
||||
const struct vec2 *max_v)
|
||||
{
|
||||
if (v->x > max_v->x)
|
||||
dst->x = max_v->x;
|
||||
|
|
@ -161,7 +155,7 @@ EXPORT void vec2_abs(struct vec2 *dst, const struct vec2 *v);
|
|||
EXPORT void vec2_floor(struct vec2 *dst, const struct vec2 *v);
|
||||
EXPORT void vec2_ceil(struct vec2 *dst, const struct vec2 *v);
|
||||
EXPORT int vec2_close(const struct vec2 *v1, const struct vec2 *v2,
|
||||
float epsilon);
|
||||
float epsilon);
|
||||
EXPORT void vec2_norm(struct vec2 *dst, const struct vec2 *v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue