#ifndef __DARKRL__MATH_HPP__ #define __DARKRL__MATH_HPP__ #include <algorithm> #include <cmath> #include <stdint.h> #include "ForceInline.hpp" template<typename T> static etcpak_force_inline T AlignPOT( T val ) { … } static etcpak_force_inline int CountSetBits( uint32_t val ) { … } static etcpak_force_inline int CountLeadingZeros( uint32_t val ) { … } static etcpak_force_inline float sRGB2linear( float v ) { … } static etcpak_force_inline float linear2sRGB( float v ) { … } template<class T> static etcpak_force_inline T SmoothStep( T x ) { … } static etcpak_force_inline uint8_t clampu8( int32_t val ) { … } template<class T> static etcpak_force_inline T sq( T val ) { … } static etcpak_force_inline int mul8bit( int a, int b ) { … } #endif