Lightmetrica  0.0.1.50dbee3 (yosakoi)
 All Classes Functions Variables Typedefs Enumerations Enumerator
math.basic.h
1 /*
2  Lightmetrica : A research-oriented renderer
3 
4  Copyright (c) 2014 Hisanari Otsu
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 #ifndef LIB_LIGHTMETRICA_MATH_BASIC_H
22 #define LIB_LIGHTMETRICA_MATH_BASIC_H
23 
24 #include "math.common.h"
25 
26 LM_NAMESPACE_BEGIN
27 LM_MATH_NAMESPACE_BEGIN
28 
29 template <typename T> LM_FORCE_INLINE T Radians(const T& v);
30 template <typename T> LM_FORCE_INLINE T Degrees(const T& v);
31 template <typename T> LM_FORCE_INLINE T Cos(const T& v);
32 template <typename T> LM_FORCE_INLINE T Sin(const T& v);
33 template <typename T> LM_FORCE_INLINE T Tan(const T& v);
34 template <typename T> LM_FORCE_INLINE T Abs(const T& v);
35 template <typename T> LM_FORCE_INLINE T Sqrt(const T& v);
36 template <typename T> LM_FORCE_INLINE T Log(const T& v);
37 template <typename T> LM_FORCE_INLINE T Exp(const T& v);
38 template <typename T> LM_FORCE_INLINE T Ceil(const T& v);
39 template <typename T> LM_FORCE_INLINE T Pow(const T& base, const T& exp);
40 template <typename T> LM_FORCE_INLINE T Min(const T& v1, const T& v2);
41 template <typename T> LM_FORCE_INLINE T Max(const T& v1, const T& v2);
42 template <typename T> LM_FORCE_INLINE T Clamp(const T& v, const T& min, const T& max);
43 template <typename T> LM_FORCE_INLINE T Fract(const T& v);
44 template <typename T> LM_FORCE_INLINE bool IsZero(const T& v);
45 
46 LM_MATH_NAMESPACE_END
47 LM_NAMESPACE_END
48 
49 #include "math.basic.inl"
50 
51 #endif // LIB_LIGHTMETRICA_MATH_BASIC_H