Use Base::toRadians() instead of manually converting
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Converter.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include "CenterLine.h"
|
||||
#include "DrawUtil.h"
|
||||
@@ -392,7 +393,7 @@ std::pair<Base::Vector3d, Base::Vector3d> CenterLine::rotatePointsAroundMid(cons
|
||||
const double angleDeg)
|
||||
{
|
||||
std::pair<Base::Vector3d, Base::Vector3d> result;
|
||||
double angleRad = angleDeg * std::numbers::pi / 180.0;
|
||||
double angleRad = Base::toRadians(angleDeg);
|
||||
|
||||
result.first.x = ((p1.x - mid.x) * cos(angleRad)) - ((p1.y - mid.y) * sin(angleRad)) + mid.x;
|
||||
result.first.y = ((p1.x - mid.x) * sin(angleRad)) + ((p1.y - mid.y) * cos(angleRad)) + mid.y;
|
||||
|
||||
Reference in New Issue
Block a user