2017-05-24 18:44:43 +00:00
|
|
|
#pragma once
|
|
|
|
#include_next <math.h>
|
2018-03-29 18:46:14 +00:00
|
|
|
#ifndef __MINGW32__
|
2017-05-24 18:44:43 +00:00
|
|
|
/* "Old" (Pre-2015) Windows headers/libc don't have round. */
|
|
|
|
static inline double round(double f)
|
|
|
|
{
|
|
|
|
return f >= 0? (int)(f + 0.5) : (int)(f - 0.5);
|
2018-03-29 18:46:14 +00:00
|
|
|
}
|
|
|
|
#endif
|