Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't use sincosf().
sincosf() just becomes a direct call to cosf() in many cases anyhow, so let's
keep this simple for now.
  • Loading branch information
icculus committed Apr 25, 2018
1 parent 42bd25e commit 788bd5d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions mojoal.c
Expand Up @@ -6,9 +6,6 @@
* This file written by Ryan C. Gordon.
*/

/* this gets us sincos() if using glibc. */
#define _GNU_SOURCE

#include <stdio.h>
#include <math.h>
#include <float.h>
Expand Down Expand Up @@ -1005,12 +1002,8 @@ static __m128 normalize_sse(const __m128 v)
angle is in radians, not degrees. */
static void calculate_sincos(const ALfloat angle, ALfloat *_sin, ALfloat *_cos)
{
#ifdef __GLIBC__
sincosf(angle, _sin, _cos);
#else
*_sin = sinf(angle);
*_cos = cosf(angle);
#endif
*_sin = SDL_sinf(angle);
*_cos = SDL_cosf(angle);
}

static ALfloat calculate_distance_attenuation(const ALCcontext *ctx, const ALsource *src, ALfloat distance)
Expand Down

0 comments on commit 788bd5d

Please sign in to comment.