diff options
Diffstat (limited to 'examples/widgets/painting/painterpaths/window.cpp')
-rw-r--r-- | examples/widgets/painting/painterpaths/window.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/painting/painterpaths/window.cpp b/examples/widgets/painting/painterpaths/window.cpp index 5b1acf9c01..d3311075f5 100644 --- a/examples/widgets/painting/painterpaths/window.cpp +++ b/examples/widgets/painting/painterpaths/window.cpp @@ -43,7 +43,7 @@ #include <QtWidgets> -#include <math.h> +#include <cmath> //! [0] const float Pi = 3.14159f; @@ -123,8 +123,8 @@ Window::Window() QPainterPath starPath; starPath.moveTo(90, 50); for (int i = 1; i < 5; ++i) { - starPath.lineTo(50 + 40 * cos(0.8 * i * Pi), - 50 + 40 * sin(0.8 * i * Pi)); + starPath.lineTo(50 + 40 * std::cos(0.8 * i * Pi), + 50 + 40 * std::sin(0.8 * i * Pi)); } starPath.closeSubpath(); //! [9] |