1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Fix example build errors on legacy MinGW

This commit is contained in:
Camilla Berglund 2015-11-10 14:07:30 +01:00
parent 27462c1078
commit d9e43ea120
2 changed files with 3 additions and 3 deletions

4
deps/linmath.h vendored
View File

@ -37,7 +37,7 @@ static inline float vec##n##_mul_inner(vec##n const a, vec##n const b) \
} \ } \
static inline float vec##n##_len(vec##n const v) \ static inline float vec##n##_len(vec##n const v) \
{ \ { \
return sqrtf(vec##n##_mul_inner(v,v)); \ return (float) sqrt(vec##n##_mul_inner(v,v)); \
} \ } \
static inline void vec##n##_norm(vec##n r, vec##n const v) \ static inline void vec##n##_norm(vec##n r, vec##n const v) \
{ \ { \
@ -554,7 +554,7 @@ static inline void quat_from_mat4x4(quat q, mat4x4 M)
p = &perm[i]; p = &perm[i];
} }
r = sqrtf(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] ); r = (float) sqrt(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] );
if(r < 1e-6) { if(r < 1e-6) {
q[0] = 1.f; q[0] = 1.f;

View File

@ -319,7 +319,7 @@ static void update_map(int num_iter)
{ {
GLfloat dx = center_x - map_vertices[0][ii]; GLfloat dx = center_x - map_vertices[0][ii];
GLfloat dz = center_z - map_vertices[2][ii]; GLfloat dz = center_z - map_vertices[2][ii];
GLfloat pd = (2.0f * sqrtf((dx * dx) + (dz * dz))) / circle_size; GLfloat pd = (2.0f * (float) sqrt((dx * dx) + (dz * dz))) / circle_size;
if (fabs(pd) <= 1.0f) if (fabs(pd) <= 1.0f)
{ {
/* tx,tz is within the circle */ /* tx,tz is within the circle */