src/libm/math.h
author Sam Lantinga <slouken@libsdl.org>
Fri, 08 Apr 2011 13:03:26 -0700
changeset 5535 96594ac5fd1a
parent 5262 b530ef003506
permissions -rw-r--r--
SDL 1.3 is now under the zlib license.
slouken@2756
     1
/*
slouken@5535
     2
  Simple DirectMedia Layer
slouken@5535
     3
  Copyright (C) 1997-2011 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@4873
    31
slouken@4870
    32
#ifndef HAVE_ATAN2
slouken@4870
    33
#define __ieee754_atan2 SDL_atan2
slouken@4870
    34
#endif
slouken@4870
    35
slouken@3012
    36
#ifdef HAVE_COPYSIGN
slouken@3012
    37
#define copysign        SDL_uclibc_copysign
slouken@3012
    38
#else
slouken@3012
    39
#define copysign        SDL_copysign
slouken@3012
    40
#endif
slouken@2769
    41
slouken@3012
    42
#ifdef HAVE_COS
slouken@3012
    43
#define cos             SDL_uclibc_cos
slouken@3012
    44
#else
slouken@3012
    45
#define cos             SDL_cos
slouken@3012
    46
#endif
slouken@2756
    47
slouken@3012
    48
#ifdef HAVE_FABS
slouken@3012
    49
#define fabs            SDL_uclibc_fabs
slouken@3012
    50
#else
slouken@3012
    51
#define fabs            SDL_fabs
slouken@3012
    52
#endif
slouken@2756
    53
slouken@3012
    54
#ifdef HAVE_FLOOR
slouken@3012
    55
#define floor           SDL_uclibc_floor
slouken@3012
    56
#else
slouken@3012
    57
#define floor           SDL_floor
slouken@3012
    58
#endif
slouken@2756
    59
slouken@3012
    60
#ifndef HAVE_LOG
slouken@3012
    61
#define __ieee754_log   SDL_log
slouken@3012
    62
#endif
slouken@2769
    63
slouken@3012
    64
#ifndef HAVE_POW
slouken@3012
    65
#define __ieee754_pow   SDL_pow
slouken@3012
    66
#endif
slouken@3012
    67
slouken@3012
    68
#ifdef HAVE_SCALBN
slouken@3012
    69
#define scalbn          SDL_uclibc_scalbn
slouken@3012
    70
#else
slouken@3012
    71
#define scalbn          SDL_scalbn
slouken@3012
    72
#endif
slouken@3012
    73
slouken@3012
    74
#ifdef HAVE_SIN
slouken@3012
    75
#define sin             SDL_uclibc_sin
slouken@3012
    76
#else
slouken@3012
    77
#define sin             SDL_sin
slouken@3012
    78
#endif
slouken@3012
    79
slouken@3012
    80
#ifndef HAVE_SQRT
slouken@3012
    81
#define __ieee754_sqrt  SDL_sqrt
slouken@3012
    82
#endif
slouken@2756
    83
slouken@2756
    84
/* vi: set ts=4 sw=4 expandtab: */