Use Base::toRadians() instead of manually converting
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QSignalMapper>
|
||||
|
||||
#include <Base/Tools.h>
|
||||
#include <App/GeoFeature.h>
|
||||
#include <App/PropertyGeo.h>
|
||||
|
||||
@@ -378,7 +379,6 @@ Base::Vector3d Transform::getDirection() const
|
||||
|
||||
Base::Placement Transform::getPlacementData() const
|
||||
{
|
||||
using std::numbers::pi;
|
||||
int index = ui->rotationInput->currentIndex();
|
||||
Base::Rotation rot;
|
||||
Base::Vector3d pos;
|
||||
@@ -389,7 +389,8 @@ Base::Placement Transform::getPlacementData() const
|
||||
|
||||
if (index == 0) {
|
||||
Base::Vector3d dir = getDirection();
|
||||
rot.setValue(Base::Vector3d(dir.x,dir.y,dir.z),ui->angle->value().getValue()*pi/180.0);
|
||||
rot.setValue(Base::Vector3d(dir.x,dir.y,dir.z),
|
||||
Base::toRadians(ui->angle->value().getValue()));
|
||||
}
|
||||
else if (index == 1) {
|
||||
rot.setYawPitchRoll(
|
||||
|
||||
Reference in New Issue
Block a user