lrint equivalent command

hi everyone,

i am transfering a code on Linux to visual studio 10 and there is a command which is notĀ“defined in vs10 and it is lrint.
is there any equivalent command or function for it?

const int X=lrint(1.0/dt);
const int Y=lrint(0.8/dt);

thank you in advance
closed account (E0p9LyTq)
As long as you are using a C++11 (or later) compiler all you need to do is include the <cmath> or <ctgmath> header and you should be good to go.

http://www.cplusplus.com/reference/cmath/lrint/

http://en.cppreference.com/w/cpp/numeric/math/rint
Topic archived. No new replies allowed.