# GLM: func_common.hpp Source File

- Main Page
- Namespaces
- Files

- File List

# func_common.hpp

    00001
    00002 // OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)
    00004 // Created : 2008-03-08
    00005 // Updated : 2008-03-08
    00006 // Licence : This source is under MIT License
    00007 // File    : glm/core/func_common.h
    00009
    00010 #ifndef glm_core_func_common
    00011 #define glm_core_func_common
    00012
    00013 namespace glm
    00014 {
    00015         namespace test{
    00016                 void main_core_func_common();
    00017         }//namespace test
    00018
    00019         namespace core{
    00020         namespace function{
    00022         namespace common{
    00023
    00026         template <typename genFIType>
    00027         genFIType abs(genFIType const & x);
    00028
    00031         template <typename genFIType>
    00032         genFIType sign(genFIType const & x);
    00033
    00036         template <typename genType>
    00037         genType floor(genType const & x);
    00038
    00042         template <typename genType>
    00043         genType trunc(genType const & x);
    00044
    00051         template <typename genType>
    00052         genType round(genType const & x);
    00053
    00058         template <typename genType>
    00059         genType roundEven(genType const & x);
    00060
    00064     template <typename genType>
    00065         genType ceil(genType const & x);
    00066
    00069     template <typename genType>
    00070         genType fract(genType const & x);
    00071
    00075     template <typename genTypeT, typename genTypeU>
    00076         genTypeT mod(
    00077                 genTypeT const & x,
    00078                 genTypeU const & y);
    00079
    00085         template <typename genType>
    00086         genType modf(
    00087                 genType const & x,
    00088                 genType & i);
    00089
    00092         template <typename genUIFTypeT, typename genUIFTypeU>
    00093         genUIFTypeT min(
    00094                 genUIFTypeT const & x,
    00095                 genUIFTypeU const & y);
    00096
    00099         template <typename genUIFTypeT, typename genUIFTypeU>
    00100         genUIFTypeT max(
    00101                 genUIFTypeT const & x,
    00102                 genUIFTypeU const & y);
    00103
    00107         template <typename genUIFTypeT, typename genUIFTypeU>
    00108         genUIFTypeT clamp(
    00109                 genUIFTypeT const & x,
    00110                 genUIFTypeU const & minVal,
    00111                 genUIFTypeU const & maxVal);
    00112
    00136         // \todo Test when 'a' is a boolean.
    00137         template <typename genTypeT, typename genTypeU>
    00138         genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
    00139
    00142         template <typename genTypeT, typename genTypeU>
    00143         genTypeU step(genTypeT const & edge, genTypeU const & x);
    00144
    00155         template <typename genTypeT, typename genTypeU>
    00156         genTypeU smoothstep(genTypeT const & edge0, genTypeT const & edge1, genTypeU const & x);
    00157
    00164         template <typename genType>
    00165         typename genType::bool_type isnan(genType const & x);
    00166
    00173         template <typename genType>
    00174         typename genType::bool_type isinf(genType const & x);
    00175
    00176         }//namespace common
    00177         }//namespace function
    00178         }//namespace core
    00179
    00180         using namespace core::function::common;
    00181 }//namespace glm
    00182
    00183 #include "func_common.inl"
    00184
    00185 #endif//glm_core_func_common