summaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorrealstealthninja <68815218+realstealthninja@users.noreply.github.com>2026-09-22 05:55:32 +0530
committerrealstealthninja <68815218+realstealthninja@users.noreply.github.com>2026-09-22 06:10:08 +0530
commit95cb54a77632eef2c0593c86891c957687f96e58 (patch)
tree68963a0c2e2bdb11b2f72469234a01b27908fa00
parent12fccb7175d0b76dc813689dc32050b628f9adb2 (diff)
fix: use cmath and math defines
-rw-r--r--gunit_tests/imageDraw.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/gunit_tests/imageDraw.cpp b/gunit_tests/imageDraw.cpp
index b548b8e..25b6f4d 100644
--- a/gunit_tests/imageDraw.cpp
+++ b/gunit_tests/imageDraw.cpp
@@ -1,5 +1,6 @@
#include "drawTestBase.h"
-#include <math.h>
+#define _USE_MATH_DEFINES
+#include <cmath>
class ImageDrawTest : public DrawTestBase {
@@ -148,7 +149,7 @@ TEST_F(ImageDrawTest, PaintImageOnImage) {
TEST_F(ImageDrawTest, PaintImageClipped) {
VkvgContext ctx = vkvg_create(surf);
- vkvg_arc(ctx, 140, 140, 100, 0, 2.f*M_PI);
+ vkvg_arc(ctx, 140, 140, 100, 0, 2.f * M_PI);
vkvg_clip(ctx);
vkvg_set_source_surface(ctx, imgSurf, 0, 0);
vkvg_paint(ctx);
@@ -160,8 +161,8 @@ TEST_F(ImageDrawTest, PaintImageClipped) {
}
TEST_F(ImageDrawTest, PaintImageClipped2) {
VkvgContext ctx = vkvg_create(surf);
- vkvg_rectangle(ctx, 100,100, 200, 200);
- vkvg_arc(ctx, 140, 140, 100, 0, 2.f*M_PI);
+ vkvg_rectangle(ctx, 100, 100, 200, 200);
+ vkvg_arc(ctx, 140, 140, 100, 0, 2.f * M_PI);
vkvg_clip(ctx);
vkvg_set_source_surface(ctx, imgSurf, 0, 0);
vkvg_paint(ctx);