FastLED 3.9.15
Loading...
Searching...
No Matches
math_macros.h
Go to the documentation of this file.
1#pragma once
2
3#ifndef MAX
4#define MAX(a,b) ((a)>(b)?(a):(b))
5#endif
6
7#ifndef MIN
8#define MIN(a,b) ((a)<(b)?(a):(b))
9#endif
10
11#ifndef ABS
12#define ABS(x) ((x)>0?(x):-(x))
13#endif
14
15#ifndef ALMOST_EQUAL
16#define ALMOST_EQUAL(a,b,small) (ABS((a)-(b))<small)
17#endif
18
19#ifndef PI
20#define PI 3.1415926535897932384626433832795
21#endif