📄 csmaxmin.h
字号:
/***********************************************************************
CSA Library, Free Evaluation Version 2.2.0
Release: June 9th 1997
Inline versions of 'max' and 'min' which return an
'appropriate' variable type.
Useful for calling polymorphic functions.
Copyright(c) 1994-1997
ComBits
The Netherlands
***********************************************************************/
#ifndef __CSMAXMIN_H
#define __CSMAXMIN_H
#include "cstypes.h"
#include "cscopton.h"
inline U16 csmin(U16 x,U16 y) { return (x<y) ? x: y; }
inline S16 csmin(S16 x,U16 y) { return ((S32)x<(S32)y) ? x: y; }
inline S32 csmin(S32 x,U16 y) { return ((S32)x<(S32)y) ? x: y; }
inline U16 csmin(U32 x,U16 y) { return (x<y) ? x: y; }
inline S16 csmin(U16 x,S16 y) { return ((S32)x<(S32)y) ? x: y; }
inline S16 csmin(S16 x,S16 y) { return (x<y) ? x: y; }
inline S32 csmin(S32 x,S16 y) { return (x<y) ? x: y; }
inline S16 csmin(U32 x,S16 y) { return ((S32)x<(S32)y) ? x: y; }
inline S32 csmin(U16 x,S32 y) { return ((S32)x<(S32)y) ? x: y; }
inline S32 csmin(S16 x,S32 y) { return (x<y) ? x: y; }
inline S32 csmin(S32 x,S32 y) { return (x<y) ? x: y; }
inline S32 csmin(U32 x,S32 y) { return ((S32)x<(S32)y) ? x: y; }
inline U16 csmin(U16 x,U32 y) { return (x<y) ? x: y; }
inline S16 csmin(S16 x,U32 y) { return ((S32)x<(S32)y) ? x: y; }
inline S32 csmin(S32 x,U32 y) { return ((S32)x<(S32)y) ? x: y; }
inline U32 csmin(U32 x,U32 y) { return (x<y) ? x: y; }
inline float csmin(float x,float y) { return (x<y) ? x: y; }
inline U16 csmax(U16 x,U16 y) { return (x>y) ? x: y; }
inline U16 csmax(S16 x,U16 y) { return ((S32)x>(S32)y) ? x: y; }
inline S32 csmax(S32 x,U16 y) { return ((S32)x>(S32)y) ? x: y; }
inline U32 csmax(U32 x,U16 y) { return (x>y) ? x: y; }
inline U16 csmax(U16 x,S16 y) { return ((S32)x>(S32)y) ? x: y; }
inline S16 csmax(S16 x,S16 y) { return (x>y) ? x: y; }
inline S32 csmax(S32 x,S16 y) { return (x>y) ? x: y; }
inline U32 csmax(U32 x,S16 y) { return ((S32)x>(S32)y) ? x: y; }
inline S32 csmax(U16 x,S32 y) { return ((S32)x>(S32)y) ? x: y; }
inline S32 csmax(S16 x,S32 y) { return (x>y) ? x: y; }
inline S32 csmax(S32 x,S32 y) { return (x>y) ? x: y; }
inline U32 csmax(U32 x,S32 y) { return ((S32)x>(S32)y) ? x: y; }
inline U32 csmax(U16 x,U32 y) { return (x>y) ? x: y; }
inline U32 csmax(S16 x,U32 y) { return ((S32)x>(S32)y) ? x: y; }
inline U32 csmax(S32 x,U32 y) { return ((S32)x>(S32)y) ? x: y; }
inline U32 csmax(U32 x,U32 y) { return (x>y) ? x: y; }
inline float csmax(float x,float y) { return (x>y) ? x: y; }
#include "cscoptof.h"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -