summaryrefslogtreecommitdiff
path: root/test/unittest_circles.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-02-26 18:19:43 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-02-26 18:19:43 +0100
commit7810cda145dae1a0dfc739ec24078a73e3138088 (patch)
tree7fc02ce2f4f476cd0415677945185df180f0ffa0 /test/unittest_circles.cxx
parente092b562ba2f6b966d7e18a5f4b2d6d242d954f3 (diff)
Fix Visual Studio build warnings
Diffstat (limited to 'test/unittest_circles.cxx')
-rw-r--r--test/unittest_circles.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unittest_circles.cxx b/test/unittest_circles.cxx
index b816a4b6d..13759a0cb 100644
--- a/test/unittest_circles.cxx
+++ b/test/unittest_circles.cxx
@@ -37,20 +37,20 @@ void arc(int xi, int yi, int w, int h, double a1, double a2)
double x = xi + rx + 0.5;
double y = yi + ry + 0.5;
double circ = M_PI*0.5*(rx+ry);
- int i, segs = circ * (a2-a1) / 100;
+ int i, segs = int(circ * (a2-a1) / 100);
if (segs<3) segs = 3;
a1 = a1/180*M_PI;
a2 = a2/180*M_PI;
double step = (a2-a1)/segs;
- int nx = x + cos(a1)*rx;
- int ny = y - sin(a1)*ry;
+ int nx = int(x + cos(a1)*rx);
+ int ny = int(y - sin(a1)*ry);
fl_point(nx, ny);
for (i=segs; i>0; i--) {
a1 += step;
- nx = x + cos(a1)*rx;
- ny = y - sin(a1)*ry;
+ nx = int(x + cos(a1)*rx);
+ ny = int(y - sin(a1)*ry);
fl_point(nx, ny);
}
}