Ignore:
Timestamp:
Jun 23, 2012, 12:46:39 PM (8 years ago)
Author:
sam
Message:

core: replace usage of sin() or std::sin() with lol::sin() where appropriate.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/lol/math/math.h

    r1512 r1513  
    1010
    1111//
    12 // Trigonometry functions
    13 // ----------------------
     12// Various maths functions
     13// -----------------------
    1414//
    1515
    16 #if !defined __LOL_MATH_TRIG_H__
    17 #define __LOL_MATH_TRIG_H__
     16#if !defined __LOL_MATH_MATH_H__
     17#define __LOL_MATH_MATH_H__
    1818
     19#include <cmath>
    1920#include <cstdio>
    2021#include <stdint.h>
     
    2425
    2526/* Standard cmath functions */
     27static inline double sqrt(double const &x) { return std::sqrt(x); }
     28static inline float sqrt(float const &x) { return std::sqrt(x); }
     29
    2630static inline double sin(double const &x) { return std::sin(x); }
    2731static inline double cos(double const &x) { return std::cos(x); }
    2832static inline double tan(double const &x) { return std::tan(x); }
     33static inline float sin(float const &x) { return std::sin(x); }
     34static inline float cos(float const &x) { return std::cos(x); }
     35static inline float tan(float const &x) { return std::tan(x); }
     36
    2937static inline double asin(double const &x) { return std::asin(x); }
    3038static inline double acos(double const &x) { return std::acos(x); }
    3139static inline double atan(double const &x) { return std::atan(x); }
    32 
    33 static inline float sin(float const &x) { return std::sin(x); }
    34 static inline float cos(float const &x) { return std::cos(x); }
    35 static inline float tan(float const &x) { return std::tan(x); }
    3640static inline float asin(float const &x) { return std::asin(x); }
    3741static inline float acos(float const &x) { return std::acos(x); }
     
    7478} /* namespace lol */
    7579
    76 #endif // __LOL_MATH_TRIG_H__
     80#endif // __LOL_MATH_MATH_H__
    7781
Note: See TracChangeset for help on using the changeset viewer.