bsnes-libretro/bsnes/gb/Windows/math.h
Tim Allen ec18efcb04 Add 'bsnes/gb/' from commit '919a88ec23f8011dd0389a4abceb62b3d0c83e00'
git-subtree-dir: bsnes/gb
git-subtree-mainline: 844e23d0f4
git-subtree-split: 919a88ec23
2020-10-12 16:43:40 +11:00

9 lines
217 B
C
Executable File

#pragma once
#include_next <math.h>
#ifndef __MINGW32__
/* "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);
}
#endif