src/libm/math_libm.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 31 Dec 2011 09:28:07 -0500
changeset 6138 4c64952a58fb
parent 6044 35448a5ea044
child 6885 700f1b25f77f
permissions -rw-r--r--
Happy New Year!
slouken@2756
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@6138
     3
  Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
slouken@2756
     4
slouken@5535
     5
  This software is provided 'as-is', without any express or implied
slouken@5535
     6
  warranty.  In no event will the authors be held liable for any damages
slouken@5535
     7
  arising from the use of this software.
slouken@2756
     8
slouken@5535
     9
  Permission is granted to anyone to use this software for any purpose,
slouken@5535
    10
  including commercial applications, and to alter it and redistribute it
slouken@5535
    11
  freely, subject to the following restrictions:
slouken@2756
    12
slouken@5535
    13
  1. The origin of this software must not be misrepresented; you must not
slouken@5535
    14
     claim that you wrote the original software. If you use this software
slouken@5535
    15
     in a product, an acknowledgment in the product documentation would be
slouken@5535
    16
     appreciated but is not required.
slouken@5535
    17
  2. Altered source versions must be plainly marked as such, and must not be
slouken@5535
    18
     misrepresented as being the original software.
slouken@5535
    19
  3. This notice may not be removed or altered from any source distribution.
slouken@2756
    20
*/
slouken@2756
    21
#include "SDL_config.h"
slouken@3012
    22
#include "SDL_stdinc.h"
slouken@2756
    23
slouken@2760
    24
/* Math routines from uClibc: http://www.uclibc.org */
slouken@2760
    25
slouken@4873
    26
#ifdef HAVE_ATAN
slouken@4873
    27
#define atan            SDL_uclibc_atan
slouken@4873
    28
#else
slouken@4873
    29
#define atan            SDL_atan
slouken@4873
    30
#endif
slouken@6044
    31
double atan(double x);
slouken@4873
    32
slouken@4870
    33
#ifndef HAVE_ATAN2
slouken@4870
    34
#define __ieee754_atan2 SDL_atan2
slouken@4870
    35
#endif
slouken@4870
    36
slouken@3012
    37
#ifdef HAVE_COPYSIGN
slouken@3012
    38
#define copysign        SDL_uclibc_copysign
slouken@3012
    39
#else
slouken@3012
    40
#define copysign        SDL_copysign
slouken@3012
    41
#endif
slouken@6044
    42
double copysign(double x, double y);
slouken@2769
    43
slouken@3012
    44
#ifdef HAVE_COS
slouken@3012
    45
#define cos             SDL_uclibc_cos
slouken@3012
    46
#else
slouken@3012
    47
#define cos             SDL_cos
slouken@3012
    48
#endif
slouken@6044
    49
double cos(double x);
slouken@2756
    50
slouken@3012
    51
#ifdef HAVE_FABS
slouken@3012
    52
#define fabs            SDL_uclibc_fabs
slouken@3012
    53
#else
slouken@3012
    54
#define fabs            SDL_fabs
slouken@3012
    55
#endif
slouken@6044
    56
double fabs(double x);
slouken@2756
    57
slouken@3012
    58
#ifdef HAVE_FLOOR
slouken@3012
    59
#define floor           SDL_uclibc_floor
slouken@3012
    60
#else
slouken@3012
    61
#define floor           SDL_floor
slouken@3012
    62
#endif
slouken@6044
    63
double floor(double x);
slouken@2756
    64
slouken@3012
    65
#ifndef HAVE_LOG
slouken@3012
    66
#define __ieee754_log   SDL_log
slouken@3012
    67
#endif
slouken@2769
    68
slouken@3012
    69
#ifndef HAVE_POW
slouken@3012
    70
#define __ieee754_pow   SDL_pow
slouken@3012
    71
#endif
slouken@3012
    72
slouken@3012
    73
#ifdef HAVE_SCALBN
slouken@3012
    74
#define scalbn          SDL_uclibc_scalbn
slouken@3012
    75
#else
slouken@3012
    76
#define scalbn          SDL_scalbn
slouken@3012
    77
#endif
slouken@6044
    78
double scalbn(double x, int n);
slouken@3012
    79
slouken@3012
    80
#ifdef HAVE_SIN
slouken@3012
    81
#define sin             SDL_uclibc_sin
slouken@3012
    82
#else
slouken@3012
    83
#define sin             SDL_sin
slouken@3012
    84
#endif
slouken@6044
    85
double sin(double x);
slouken@3012
    86
slouken@3012
    87
#ifndef HAVE_SQRT
slouken@3012
    88
#define __ieee754_sqrt  SDL_sqrt
slouken@3012
    89
#endif
slouken@2756
    90
slouken@2756
    91
/* vi: set ts=4 sw=4 expandtab: */