File: 0012-Define-M_PIf-only-if-it-is-not-already-defined-in-ma.patch

package info (click to toggle)
filament 1.9.25%2Bdfsg3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 95,404 kB
  • sloc: cpp: 762,244; asm: 77,287; ansic: 31,754; python: 9,629; javascript: 7,293; cs: 4,310; yacc: 3,650; sh: 2,269; java: 1,549; pascal: 419; makefile: 376; xml: 94; ruby: 88; lisp: 9
file content (22 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Mon, 7 Feb 2022 10:12:08 +0100
Subject: Define M_PIf only if it is not already defined in math.h

---
 libs/image/src/ImageSampler.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libs/image/src/ImageSampler.cpp b/libs/image/src/ImageSampler.cpp
index 00385e9..53c68e8 100644
--- a/libs/image/src/ImageSampler.cpp
+++ b/libs/image/src/ImageSampler.cpp
@@ -38,7 +38,9 @@ struct FilterFunction {
     bool rejectExternalSamples = true;
 };
 
+#ifndef M_PIf
 constexpr float M_PIf = float(filament::math::F_PI);
+#endif
 
 const FilterFunction Box {
     .fn = [](float t) { return t <= 0.5f ? 1.0f : 0.0f; },