Use Base::toRadians() instead of manually converting

This commit is contained in:
Benjamin Nauck
2025-04-09 09:14:54 +02:00
parent 5a1cdcfd11
commit f932c7e4e0
43 changed files with 129 additions and 106 deletions

View File

@@ -25,6 +25,7 @@
#include <App/Application.h>
#include <Base/Parameter.h>
#include <Base/Tools.h>
#include "PathSegmentWalker.h"
@@ -187,7 +188,7 @@ void PathSegmentWalker::walk(PathSegmentVisitor& cb, const Base::Vector3d& start
if (nrot != lrot) {
double amax = std::max(fmod(fabs(a - A), 360),
std::max(fmod(fabs(b - B), 360), fmod(fabs(c - C), 360)));
double angle = amax / 180 * std::numbers::pi;
double angle = Base::toRadians(amax);
int segments = std::max(ARC_MIN_SEGMENTS, 3.0 / (deviation / angle));
double da = (a - A) / segments;
@@ -329,7 +330,7 @@ void PathSegmentWalker::walk(PathSegmentVisitor& cb, const Base::Vector3d& start
if (nrot != lrot) {
double amax = std::max(fmod(fabs(a - A), 360),
std::max(fmod(fabs(b - B), 360), fmod(fabs(c - C), 360)));
double angle = amax / 180 * std::numbers::pi;
double angle = Base::toRadians(amax);
int segments = std::max(ARC_MIN_SEGMENTS, 3.0 / (deviation / angle));
double da = (a - A) / segments;