📄 utility.h
字号:
/*****************************************************************************
* VCGLib *
* *
* Visual Computing Group o> *
* IEI Institute, CNUCE Institute, CNR Pisa <| *
* / \ *
* Copyright(C) 1999 by Paolo Cignoni, Claudio Rocchini *
* All rights reserved. *
* *
* Permission to use, copy, modify, distribute and sell this software and *
* its documentation for any purpose is hereby granted without fee, provided *
* that the above copyright notice appear in all copies and that both that *
* copyright notice and this permission notice appear in supporting *
* documentation. the author makes no representations about the suitability *
* of this software for any purpose. It is provided "as is" without express *
* or implied warranty. *
* *
*****************************************************************************/
/****************************************************************************
History
1999 Feb 02 First Draft.
1999 May 15 Corrected Scope of sqrt.. (added ::)
****************************************************************************/
#ifndef __VCGLIB_UTILITY
#define __VCGLIB_UTILITY
#include <math.h>
namespace vcg {
inline int sqrt(int v) {return int(::sqrt(v));};
inline short sqrt(short v) {return short(::sqrtf(v));};
inline float sqrt(float v) {return ::sqrtf(v);};
inline double sqrt(double v) {return ::sqrt(v);};
inline int abs(int v) {return ::abs(v);};
inline short abs(short v) {return short(::abs(v));};
inline float abs(float v) {return ::fabsf(v);};
inline double abs(double v) {return ::fabs(v);};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -