//! @copyright *this file is freware. //! @warning Use it at your own risk. //! @file functional_modulus.hpp //! @author Dejan D. M. Milosavljevic //! @version 1.0 //! @date 2003 //! @please "Do not remove or change this comments" //! @description Explicit specializations of modulus<>. //! @bug //! @warning Use it at your own risk. //! @copyright *this file is freware. #ifndef DDMRM_functional_modulus_HPP_ #define DDMRM_functional_modulus_HPP_ #include #include //namespace stl_ext //{ template<> struct std::modulus : public std::binary_function { float operator()(const float& P_left, const float& P_right) const { return float( fmod( P_left, P_right ) ); } }; template<> struct std::modulus : public std::binary_function { double operator()(const double& P_left, const double& P_right) const { return double( fmod( P_left, P_right ) ); } }; template<> struct std::modulus : public std::binary_function { long double operator()(const long double& P_left, const long double& P_right) const { return long double ( fmod( P_left, P_right ) ); } }; //} #endif