📄 commonmc.h
字号:
#ifndef __COMMON_MC_H
#define __COMMON_MC_H
#if (HAVE_ERF)
# if (HAVE_GSL)
# include "gsl/gsl_math.h"
# include "gsl/gsl_sf_erf.h"
# else
# include <math.h>
# endif
#else
# include <math.h>
extern double erf(double); /* in win32 directory */
#endif
/* Tresid/Lresid smaller than these are considered to be zero */
#define T_TOL 1e-18
#define L_TOL 1e-9
/* Commonly used code snippets for working with packed coordinate
representations */
#define DISTANCE(R1, R2) sqrt(SQR((R1.ix+R1.fx)-(R2.ix+R2.fx)) + \
SQR((R1.iy+R1.fy)-(R2.iy+R2.fy)) + \
SQR((R1.iz+R1.fz)-(R2.iz+R2.fz)))
#define PACKCOORD(R,x,y,z) R.ix = (int)(x); R.fx = (x) - R.ix; \
R.iy = (int)(y); R.fy = (y) - R.iy; \
R.iz = (int)(z); R.fz = (z) - R.iz;
#define UNPACKCOORD(R,x,y,z) (x) = R.ix + R.fx; \
(y) = R.iy + R.fy; \
(z) = R.iz + R.fz
#endif /* __COMMON_MC_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -