Skip to content

Commit

Permalink
Fixed formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Oct 17, 2023
1 parent d26d327 commit f001235
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions avogadro/qtplugins/resetview/resetview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include <avogadro/qtopengl/glwidget.h>
#include <avogadro/rendering/camera.h>

#include <QTimer>
#include <QAction>
#include <QOpenGLWidget>
#include <QDebug>
#include <QOpenGLWidget>
#include <QTimer>

#include <limits>

Expand Down Expand Up @@ -52,10 +52,11 @@ void ResetView::registerCommands()
emit registerCommand("alignView", tr("Align view to axes."));
}

bool ResetView::handleCommand(const QString& command, const QVariantMap& options)
bool ResetView::handleCommand(const QString& command,
const QVariantMap& options)
{
if (m_molecule == nullptr || m_camera == nullptr)
return false; // Nothing to do
return false; // Nothing to do

if (command == "alignView") {
qDebug() << " align ";
Expand Down Expand Up @@ -204,13 +205,13 @@ inline void getOBB(const Array<Vector3>& mols, Vector3d& centroid,
{
centroid = Vector3::Zero();

for (const auto & mol : mols)
for (const auto& mol : mols)
centroid += mol;

centroid /= (double)mols.size();
Matrix3d covariance = Matrix3::Zero();

for (const auto & mol : mols) {
for (const auto& mol : mols) {
Vector3d adjusted = mol - centroid;
covariance += adjusted * adjusted.transpose();
}
Expand Down Expand Up @@ -273,4 +274,4 @@ void ResetView::alignToAxes()
animationCameraDefault();
}

} // namespace Avogadro
} // namespace Avogadro::QtPlugins

0 comments on commit f001235

Please sign in to comment.