summaryrefslogtreecommitdiffstatsci
path: root/gunit_tests/save_restore.cpp
diff options
context:
space:
mode:
authorrealstealthninja <68815218+realstealthninja@users.noreply.github.com>2026-09-22 05:57:35 +0530
committerrealstealthninja <68815218+realstealthninja@users.noreply.github.com>2026-09-22 06:10:32 +0530
commitccd92fca2f30e38e124743e18dd2b7d0b2edb168 (patch)
treeea0477172495507afbd333b22c683d47886cb352 /gunit_tests/save_restore.cpp
parent59753ce85d561b21acc6b58fcd302b6abe79a04d (diff)
chore: use cmath and _use_math_defines in cpp
Diffstat (limited to 'gunit_tests/save_restore.cpp')
-rw-r--r--gunit_tests/save_restore.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/gunit_tests/save_restore.cpp b/gunit_tests/save_restore.cpp
index fb0f18d..46d99da 100644
--- a/gunit_tests/save_restore.cpp
+++ b/gunit_tests/save_restore.cpp
@@ -1,5 +1,7 @@
#include "drawTestBase.h"
-#include <math.h>
+
+#define _USE_MATH_DEFINES
+#include <cmath>
class SaveRestoreTest : public DrawTestBase {
@@ -24,7 +26,7 @@ class SaveRestoreTest : public DrawTestBase {
vkvg_clip(ctx);
vkvg_set_source_rgb(ctx, depthRatio, depthRatio, 1.f);
vkvg_paint(ctx);
- vkvg_arc(ctx, 256, 256, 256.f - gap * depth, 0, 2.f*M_PI);
+ vkvg_arc(ctx, 256, 256, 256.f - gap * depth, 0, 2.f * M_PI);
vkvg_clip(ctx);
vkvg_set_source_surface(ctx, imgSurf, 0, 0);
vkvg_paint(ctx);
@@ -52,7 +54,7 @@ class SaveRestoreTest : public DrawTestBase {
TEST_F(SaveRestoreTest, RestoreClip1) {
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_save(ctx);
vkvg_reset_clip(ctx);