Use Base::toRadians() instead of manually converting
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <App/Document.h>
|
||||
#include <App/DocumentObject.h>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Control.h>
|
||||
@@ -281,7 +282,7 @@ void TaskSectionView::slotViewDirectionChanged(Base::Vector3d newDirection)
|
||||
//the CompassWidget reports that the view direction angle has changed
|
||||
void TaskSectionView::slotChangeAngle(double newAngle)
|
||||
{
|
||||
double angleRadians = newAngle * std::numbers::pi / 180.0;
|
||||
double angleRadians = Base::toRadians(newAngle);
|
||||
double unitX = cos(angleRadians);
|
||||
double unitY = sin(angleRadians);
|
||||
Base::Vector3d localUnit(unitX, unitY, 0.0);
|
||||
|
||||
Reference in New Issue
Block a user