Add roundToInt
authorRoland Schulz <roland.schulz@intel.com>
Wed, 8 Aug 2018 23:18:32 +0000 (16:18 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Mon, 10 Sep 2018 07:41:41 +0000 (09:41 +0200)
commitd854e03ef1f5ad62705bfc941552eca6a6d3907c
tree3e24fabe90639f81b7288087967924d5717fe1fe
parent264458c959d944a96b7b36525e2f3323dd0c3321
Add roundToInt

- Leaves the rounding of halfway cases implementation defined.
  Reason: It simplifies implementation and has no impact for
  anything where the input can have at least 1ulp error.
- Uses rint(f) because it is optimized in all commonly used
  compilers avoiding the use of intrinsics.

Change-Id: Id01c2a37d3e1c5000858e78332fa72beb5b3b58d
Fixes: #2562
src/gromacs/math/functions.h