interp: replace round_to_int with template
interp: replace round_to_int with template

again, this makes it safe against arguments with side effects.
It also uses std::nearbyint in preference to the open-coded
variant; if there are any differences, the behavior of
the standard function is probably equally defensible if not
more so.

(n.b. both have undefined behavior if the rounded FP value
is outside the range of int; and I happen to know that
the actual behavior on gcc is different between x86 and
arm.  blech.)

Signed-off-by: Jeff Epler <623a871f32baaca066adfe0cac08d7aa7d34027d@unpythonic.net>

ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror,ikcalB/linuxcnc-mirror