commit e9ead68d8ec1eef4487a912b2b861812c6dc9c5d
parent f4685ee33799a4d70c1756b67f1e0cbc2d558012
Author: vaplv <vaplv@free.fr>
Date: Fri, 7 Oct 2016 13:34:39 +0200
Update the realX[Y] API
The test functions return an integer rather than a char
Diffstat:
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/realX.h b/src/realX.h
@@ -131,7 +131,7 @@ REALX_FUNC__(normalize)(REAL_TYPE__* dst, const REAL_TYPE__* a)
return len;
}
-static FINLINE char
+static FINLINE int
REALX_FUNC__(is_normalized)(const REAL_TYPE__* a)
{
return REAL_EQ_EPS__(REALX_FUNC__(len)(a), (REAL_TYPE__)1.0, REAL_EPSILON__);
@@ -295,11 +295,11 @@ REALX_FUNC__(lerp)
return dst;
}
-static FINLINE char
+static FINLINE int
REALX_FUNC__(eq)(const REAL_TYPE__* a, const REAL_TYPE__* b)
{
int i = 0;
- char is_eq = 1;
+ int is_eq = 1;
ASSERT(a && b);
do {
is_eq = a[i] == b[i];
@@ -308,14 +308,14 @@ REALX_FUNC__(eq)(const REAL_TYPE__* a, const REAL_TYPE__* b)
return is_eq;
}
-static FINLINE char
+static FINLINE int
REALX_FUNC__(eq_eps)
(const REAL_TYPE__* a,
const REAL_TYPE__* b,
const REAL_TYPE__ eps)
{
int i = 0;
- char is_eq = 1;
+ int is_eq = 1;
ASSERT(a && b);
do {
is_eq = REAL_EQ_EPS__(a[i], b[i], eps);
diff --git a/src/realXY.h b/src/realXY.h
@@ -191,10 +191,10 @@ REALXY_FUNC__(minus)(REAL_TYPE__* dst, const REAL_TYPE__* a)
return REALXY_FUNC__(set__)(dst, tmp);
}
-static FINLINE char
+static FINLINE int
REALXY_FUNC__(eq)(const REAL_TYPE__* a, const REAL_TYPE__* b)
{
- char is_eq = 1;
+ int is_eq = 1;
int x = 0;
ASSERT(a && b);
@@ -206,13 +206,13 @@ REALXY_FUNC__(eq)(const REAL_TYPE__* a, const REAL_TYPE__* b)
return is_eq;
}
-static FINLINE char
+static FINLINE int
REALXY_FUNC__(eq_eps)
(const REAL_TYPE__* a,
const REAL_TYPE__* b,
const REAL_TYPE__ eps)
{
- char is_eq = 1;
+ int is_eq = 1;
int x = 0;
ASSERT(a && b);