Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/platformcompat.hh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef __PLATFORMCOMPAT_H
#define __PLATFORMCOMPAT_H

#include <math.h> // round()

#if defined(_MSC_VER)
#include <float.h> //isinf, isnan
#include <stdlib.h> //min
Expand All @@ -11,10 +9,11 @@
#define FMIN __min
#define ROUND(x) floor(x + 0.5)
#else
#define ISINF isinf
#define ISNAN isnan
#include <cmath> // round(), isinf, isnan
#define ISINF std::isinf
#define ISNAN std::isnan
#define FMIN fmin
#define ROUND round
#endif

#endif
#endif