biod.pnpi.spb.ru
/
alexxy
/
gromacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Replace rounding using int(x+0.5) with roundToInt
[alexxy/gromacs.git]
/
src
/
gromacs
/
gmxana
/
gmx_sorient.cpp
diff --git
a/src/gromacs/gmxana/gmx_sorient.cpp
b/src/gromacs/gmxana/gmx_sorient.cpp
index 2a88186f8bf92ebb64f1e82af4600e18de705e28..837c234828841ec2685eb7739a7e58b3284fd8c0 100644
(file)
--- a/
src/gromacs/gmxana/gmx_sorient.cpp
+++ b/
src/gromacs/gmxana/gmx_sorient.cpp
@@
-255,8
+255,8
@@
int gmx_sorient(int argc, char *argv[])
rcut2 = gmx::square(rcut);
invbw = 1/binwidth;
- nbin1 = 1+
static_cast<int>(2*invbw + 0.5
);
- nbin2 = 1+
static_cast<int>(invbw + 0.5
);
+ nbin1 = 1+
gmx::roundToInt(2*invbw
);
+ nbin2 = 1+
gmx::roundToInt(invbw
);
invrbw = 1/rbinw;