Skip to content

Commit

Permalink
use const float instead of define
Browse files Browse the repository at this point in the history
Signed-off-by: Slice <[email protected]>
  • Loading branch information
SergeySlice committed Feb 26, 2024
1 parent b871f2c commit 1a23556
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions rEFIt_UEFI/libeg/FloatLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#ifndef FloatLib_h
#define FloatLib_h

#define PI (3.1415926536f)
#define PI2 (6.283185307179586f)
#define PI5 (1.570796326794897f)
#define PI4 (0.78539816339745f)
#define FLT_MAX (1.0e38f)
#define FLT_MIN (1.0e-37f)
const float PI = 3.1415926536f;
const float PI2 = 6.283185307179586f;
const float PI5 = 1.570796326794897f;
const float PI4 = 0.78539816339745f;
const float FLT_MAX = 1.0e38f;
const float FLT_MIN = 1.0e-37f;

float SqrtF(float X);
float PowF(float X, INTN N);
Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/libeg/nanosvgrast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ static void nsvg__squareCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right
}

#ifndef NSVG_PI
#define NSVG_PI (3.14159265358979323846264338327f)
const float NSVG_PI = 3.141592653589793f;
#endif

static void nsvg__roundCap(NSVGrasterizer* r, NSVGpoint* left, NSVGpoint* right, NSVGpoint* p, float dx, float dy, float lineWidth, int ncap, int connect)
Expand Down

0 comments on commit 1a23556

Please sign in to comment.