9 #ifndef _FVMATHTEMPLATE_H_INCLUDED_ 10 #define _FVMATHTEMPLATE_H_INCLUDED_ 23 template<
class Type> Type
Max( Type _Left, Type _Right )
25 return ((_Left>_Right) ? _Left : _Right);
28 template<
class Type> Type
Min( Type _Left, Type _Right )
30 return ((_Left<_Right) ? _Left : _Right);
33 template<
class TD,
class TS>
void BitShiftR( TD* dst, TS src,
INT shift )
35 if( shift > 0 ) *dst = (TD)( src >> shift );
36 else if( shift < 0 ) *dst = ( (TD)src << -shift );
37 else *dst = (TD)( src );
39 template<
class TD,
class TS>
void BitShiftL( TD* dst, TS src,
INT shift )
41 if( shift > 0 ) *dst = ( (TD)src << shift );
42 else if( shift < 0 ) *dst = (TD)( src >> -shift );
43 else *dst = (TD)( src );
49 #endif // _FVMATHTEMPLATE_H_INCLUDED_ FVCLのネームスペース
Definition: EVCbasicDeclare.txt:9
int INT
整数型(32ビット)
Definition: FvDefs.h:36
void BitShiftL(TD *dst, TS src, INT shift)
ビットシフト(左)
Definition: FvMathTemplate.h:39
Type Max(Type _Left, Type _Right)
オブジェクトの大小比較
Definition: FvMathTemplate.h:23
Type Min(Type _Left, Type _Right)
オブジェクトの大小比較
Definition: FvMathTemplate.h:28
void BitShiftR(TD *dst, TS src, INT shift)
ビットシフト(右)
Definition: FvMathTemplate.h:33