src/libm/math_libm.h
changeset 6044 35448a5ea044
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/libm/math_libm.h	Mon Oct 31 05:56:58 2011 -0400
     1.3 @@ -0,0 +1,91 @@
     1.4 +/*
     1.5 +  Simple DirectMedia Layer
     1.6 +  Copyright (C) 1997-2011 Sam Lantinga <slouken@libsdl.org>
     1.7 +
     1.8 +  This software is provided 'as-is', without any express or implied
     1.9 +  warranty.  In no event will the authors be held liable for any damages
    1.10 +  arising from the use of this software.
    1.11 +
    1.12 +  Permission is granted to anyone to use this software for any purpose,
    1.13 +  including commercial applications, and to alter it and redistribute it
    1.14 +  freely, subject to the following restrictions:
    1.15 +
    1.16 +  1. The origin of this software must not be misrepresented; you must not
    1.17 +     claim that you wrote the original software. If you use this software
    1.18 +     in a product, an acknowledgment in the product documentation would be
    1.19 +     appreciated but is not required.
    1.20 +  2. Altered source versions must be plainly marked as such, and must not be
    1.21 +     misrepresented as being the original software.
    1.22 +  3. This notice may not be removed or altered from any source distribution.
    1.23 +*/
    1.24 +#include "SDL_config.h"
    1.25 +#include "SDL_stdinc.h"
    1.26 +
    1.27 +/* Math routines from uClibc: http://www.uclibc.org */
    1.28 +
    1.29 +#ifdef HAVE_ATAN
    1.30 +#define atan            SDL_uclibc_atan
    1.31 +#else
    1.32 +#define atan            SDL_atan
    1.33 +#endif
    1.34 +double atan(double x);
    1.35 +
    1.36 +#ifndef HAVE_ATAN2
    1.37 +#define __ieee754_atan2 SDL_atan2
    1.38 +#endif
    1.39 +
    1.40 +#ifdef HAVE_COPYSIGN
    1.41 +#define copysign        SDL_uclibc_copysign
    1.42 +#else
    1.43 +#define copysign        SDL_copysign
    1.44 +#endif
    1.45 +double copysign(double x, double y);
    1.46 +
    1.47 +#ifdef HAVE_COS
    1.48 +#define cos             SDL_uclibc_cos
    1.49 +#else
    1.50 +#define cos             SDL_cos
    1.51 +#endif
    1.52 +double cos(double x);
    1.53 +
    1.54 +#ifdef HAVE_FABS
    1.55 +#define fabs            SDL_uclibc_fabs
    1.56 +#else
    1.57 +#define fabs            SDL_fabs
    1.58 +#endif
    1.59 +double fabs(double x);
    1.60 +
    1.61 +#ifdef HAVE_FLOOR
    1.62 +#define floor           SDL_uclibc_floor
    1.63 +#else
    1.64 +#define floor           SDL_floor
    1.65 +#endif
    1.66 +double floor(double x);
    1.67 +
    1.68 +#ifndef HAVE_LOG
    1.69 +#define __ieee754_log   SDL_log
    1.70 +#endif
    1.71 +
    1.72 +#ifndef HAVE_POW
    1.73 +#define __ieee754_pow   SDL_pow
    1.74 +#endif
    1.75 +
    1.76 +#ifdef HAVE_SCALBN
    1.77 +#define scalbn          SDL_uclibc_scalbn
    1.78 +#else
    1.79 +#define scalbn          SDL_scalbn
    1.80 +#endif
    1.81 +double scalbn(double x, int n);
    1.82 +
    1.83 +#ifdef HAVE_SIN
    1.84 +#define sin             SDL_uclibc_sin
    1.85 +#else
    1.86 +#define sin             SDL_sin
    1.87 +#endif
    1.88 +double sin(double x);
    1.89 +
    1.90 +#ifndef HAVE_SQRT
    1.91 +#define __ieee754_sqrt  SDL_sqrt
    1.92 +#endif
    1.93 +
    1.94 +/* vi: set ts=4 sw=4 expandtab: */