Commit 6f831ef2 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #3037 from pbosetti/mruby-time

Implemented round(double) function when _MSC_VER < 1800
parents 9a41db6f 67e3cdfa
......@@ -11,6 +11,16 @@
#include <mruby/class.h>
#include <mruby/data.h>
#if _MSC_VER < 1800
double round(double x) {
if (x >= 0.0) {
return (double)((int)(x + 0.5));
} else {
return (double)((int)(x - 0.5));
}
}
#endif
#if !defined(__MINGW64__) && defined(_WIN32)
# define llround(x) round(x)
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment