From 142891f21c63980ab31c8f9933cd81905bd20e11 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 8 Feb 2023 08:21:56 +0100 Subject: [PATCH] common : fix MSVC M_PI .. --- examples/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/common.cpp b/examples/common.cpp index 3da76b7..194ef0e 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -8,6 +8,10 @@ #include #include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + std::string trim(const std::string & s) { std::regex e("^\\s+|\\s+$"); return std::regex_replace(s, e, "");