|
20 | 20 |
|
21 | 21 | #include <cassert>
|
22 | 22 | #include <glib.h>
|
| 23 | +#include <numbers> |
23 | 24 |
|
24 | 25 | namespace ezgl {
|
25 | 26 |
|
@@ -295,7 +296,7 @@ void renderer::set_text_rotation(double degrees)
|
295 | 296 | // Check for them before changing the angle.
|
296 | 297 | if (degrees >= -360. && degrees <= 360.) {
|
297 | 298 | // convert the given angle to rad
|
298 |
| - rotation_angle = -degrees * M_PI / 180; |
| 299 | + rotation_angle = -degrees * std::numbers::pi / 180; |
299 | 300 | }
|
300 | 301 | else {
|
301 | 302 | g_warning("set_text_rotation: bad rotation angle of %f. Ignored!", degrees);
|
@@ -697,12 +698,12 @@ void renderer::draw_arc_path(point2d center,
|
697 | 698 | // draw the arc in counter clock-wise direction if the extent angle is positive
|
698 | 699 | if(extent_angle >= 0) {
|
699 | 700 | cairo_arc_negative(
|
700 |
| - m_cairo, center.x, center.y, radius, -start_angle * M_PI / 180, -end_angle * M_PI / 180); |
| 701 | + m_cairo, center.x, center.y, radius, -start_angle * std::numbers::pi / 180, -end_angle * std::numbers::pi / 180); |
701 | 702 | }
|
702 | 703 | // draw the arc in clock-wise direction if the extent angle is negative
|
703 | 704 | else {
|
704 | 705 | cairo_arc(
|
705 |
| - m_cairo, center.x, center.y, radius, -start_angle * M_PI / 180, -end_angle * M_PI / 180); |
| 706 | + m_cairo, center.x, center.y, radius, -start_angle * std::numbers::pi / 180, -end_angle * std::numbers::pi / 180); |
706 | 707 | }
|
707 | 708 |
|
708 | 709 | // if the arc will be filled in, return back to the center of the arc
|
|
0 commit comments