diff --git a/.travis.yml b/.travis.yml index 6b00185..5d4f816 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,13 @@ language: c -sudo: required -dist: bionic + compiler: - gcc - clang + os: - linux +- osx +dist: bionic +osx_image: xcode9.4 + script: cmake -H. -Bbuild && cmake --build build diff --git a/math/vec2f.h b/math/vec2f.h index d09d79a..f01a37a 100644 --- a/math/vec2f.h +++ b/math/vec2f.h @@ -5,25 +5,25 @@ typedef struct vec2f { float y; } vec2f; -inline vec2f mulf_v2f(float s, vec2f v) { +static inline vec2f mulf_v2f(float s, vec2f v) { v.x *= s; v.y *= s; return v; } -inline vec2f add_v2f(vec2f a, vec2f b) { +static inline vec2f add_v2f(vec2f a, vec2f b) { a.x += b.x; a.y += b.y; return a; } -inline vec2f sub_v2f(vec2f a, vec2f b) { +static inline vec2f sub_v2f(vec2f a, vec2f b) { a.x -= b.x; a.y -= b.y; return a; } -inline vec2f make_v2f(float x, float y) { +static inline vec2f make_v2f(float x, float y) { vec2f v = {x, y}; return v; } diff --git a/misc/cmp.h b/misc/cmp.h index 40a1014..792ea43 100644 --- a/misc/cmp.h +++ b/misc/cmp.h @@ -2,22 +2,22 @@ #include -inline float min_f(float a, float b) { +static inline float min_f(float a, float b) { return a < b ? a : b; } -inline float max_f(float a, float b) { +static inline float max_f(float a, float b) { return a < b ? b : a; } -inline int min_i(int a, int b) { +static inline int min_i(int a, int b) { return a < b ? a : b; } -inline int max_i(int a, int b) { +static inline int max_i(int a, int b) { return a < b ? b : a; } -inline uint8_t min_u8(uint8_t a, uint8_t b) { +static inline uint8_t min_u8(uint8_t a, uint8_t b) { return a < b ? a : b; }