cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
lrint equivalent command
lrint equivalent command
Mar 8, 2017 at 10:39am UTC
zappatta360
(1)
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
Mar 8, 2017 at 1:16pm UTC
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.