aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rin/float.h12
-rw-r--r--include/rin/float_types.h21
2 files changed, 16 insertions, 17 deletions
diff --git a/include/rin/float.h b/include/rin/float.h
index afd63f5..16d1f7e 100644
--- a/include/rin/float.h
+++ b/include/rin/float.h
@@ -48,14 +48,14 @@ char *rin_float_to_hexstring(const float num, char *str, unsigned int mode);
char *rin_double_to_hexstring(const double num, char *str, unsigned int mode);
unsigned int rin_compare_float(const float a, const float b, uint32_t max_ulps);
-unsigned int rin_compare_vec2(const struct vec2 a, const struct vec2 b, uint32_t max_ulps);
-unsigned int rin_compare_vec3(const struct vec3 a, const struct vec3 b, uint32_t max_ulps);
-unsigned int rin_compare_vec4(const struct vec4 a, const struct vec4 b, uint32_t max_ulps);
+unsigned int rin_compare_rin_vec2(const struct rin_vec2 a, const struct rin_vec2 b, uint32_t max_ulps);
+unsigned int rin_compare_rin_vec3(const struct rin_vec3 a, const struct rin_vec3 b, uint32_t max_ulps);
+unsigned int rin_compare_rin_vec4(const struct rin_vec4 a, const struct rin_vec4 b, uint32_t max_ulps);
unsigned int rin_compare_double(const double a, const double b, uint64_t max_ulps);
-unsigned int rin_compare_vec2d(const struct vec2d a, const struct vec2d b, uint64_t max_ulps);
-unsigned int rin_compare_vec3d(const struct vec3d a, const struct vec3d b, uint64_t max_ulps);
-unsigned int rin_compare_vec4d(const struct vec4d a, const struct vec4d b, uint64_t max_ulps);
+unsigned int rin_compare_rin_vec2d(const struct rin_vec2d a, const struct rin_vec2d b, uint64_t max_ulps);
+unsigned int rin_compare_rin_vec3d(const struct rin_vec3d a, const struct rin_vec3d b, uint64_t max_ulps);
+unsigned int rin_compare_rin_vec4d(const struct rin_vec4d a, const struct rin_vec4d b, uint64_t max_ulps);
uint32_t rin_float_to_uint(const float num);
int32_t rin_float_to_int(const float num);
diff --git a/include/rin/float_types.h b/include/rin/float_types.h
index 2d99b2f..4510178 100644
--- a/include/rin/float_types.h
+++ b/include/rin/float_types.h
@@ -21,14 +21,13 @@
#ifndef LIBRIN_FLOAT_TYPES_INCLUDED
#define LIBRIN_FLOAT_TYPES_INCLUDED
-/* These vec[num] types mostly mimic the analogous types found in OpenGL
- * Might get renamed to rin_vec[num] in case namespace clashes
+/* These rin_vec[num] types mostly mimic the analogous types found in OpenGL
* with other existing libraries get noticed.
*
- * vecd[num] use double instead of float, but are otherwise identical to vec[num].
+ * rin_vecd[num] use double instead of float, but are otherwise identical to rin_vec[num].
*/
-struct vec2 {
+struct rin_vec2 {
union {
struct {
float x;
@@ -45,7 +44,7 @@ struct vec2 {
};
};
-struct vec3 {
+struct rin_vec3 {
union {
struct {
float x;
@@ -65,7 +64,7 @@ struct vec3 {
};
};
-struct vec4 {
+struct rin_vec4 {
union {
struct {
float x;
@@ -88,7 +87,7 @@ struct vec4 {
};
};
-struct vec2d {
+struct rin_vec2d {
union {
struct {
double x;
@@ -105,7 +104,7 @@ struct vec2d {
};
};
-struct vec3d {
+struct rin_vec3d {
union {
struct {
double x;
@@ -125,7 +124,7 @@ struct vec3d {
};
};
-struct vec4d {
+struct rin_vec4d {
union {
struct {
double x;
@@ -150,8 +149,8 @@ struct vec4d {
/* A simple 3D vertex with position and normal data. */
struct vertex {
- struct vec3 position;
- struct vec3 normal;
+ struct rin_vec3 position;
+ struct rin_vec3 normal;
};
#endif /* LIBRIN_FLOAT_TYPES_INCLUDED */