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
/
anadih.cpp
diff --git
a/src/gromacs/gmxana/anadih.cpp
b/src/gromacs/gmxana/anadih.cpp
index bc524a5890d8955a4492e729f2a065012b60cbf5..cf7869ced0ee85cec290c293dfa34323cc697dc8 100644
(file)
--- a/
src/gromacs/gmxana/anadih.cpp
+++ b/
src/gromacs/gmxana/anadih.cpp
@@
-961,7
+961,7
@@
void read_ang_dih(const char *trj_fn,
}
/* Update the distribution histogram */
- angind =
static_cast<int>((angle*maxangstat)/pifac + 0.5
);
+ angind =
gmx::roundToInt((angle*maxangstat)/pifac
);
if (angind == maxangstat)
{
angind = 0;