Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ozaq committed Apr 22, 2024
1 parent 041158d commit f8edbbd
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions libsimulator/src/GeneralizedCentrifugalForceModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Point GeneralizedCentrifugalForceModel::ForceRepPed(
const double dist_intpol_left =
mindist + maxNeighborInterpolationDistance; // lower cut-off for Frep (modCFM)
const double dist_intpol_right =
maxNeighborInteractionDistance -
maxNeighborInteractionDistance -
maxNeighborInterpolationDistance; // upper cut-off for Frep (modCFM)
const double smax = mindist - maxNeighborInterpolationDistance; // max overlapping
double f = 0.0f; // fuction value
Expand Down Expand Up @@ -281,7 +281,8 @@ Point GeneralizedCentrifugalForceModel::ForceRepPed(
if(dist_eff >= dist_intpol_right) { // 2
f = -agent1_mass * K_ij * nom / dist_intpol_right; // abs(NR-Dv(i)+Sa)
f1 = -f / dist_intpol_right;
px = hermite_interp(dist_eff, dist_intpol_right, maxNeighborInteractionDistance, f, 0, f1, 0);
px = hermite_interp(
dist_eff, dist_intpol_right, maxNeighborInteractionDistance, f, 0, f1, 0);
F_rep = ep12 * px;
} else if(dist_eff >= dist_intpol_left) { // 3
f = -agent1_mass * K_ij * nom / fabs(dist_eff); // abs(NR-Dv(i)+Sa)
Expand Down Expand Up @@ -447,7 +448,8 @@ Point GeneralizedCentrifugalForceModel::ForceInterpolation(
if(dist_eff > tmp2) { // 2
f = -nominator / dist_intpol_right;
f1 = -f / dist_intpol_right; // nominator / (dist_intpol_right^2) = derivativ of f
px = hermite_interp(dist_eff, dist_intpol_right, maxGeometryInteractionDistance, f, 0, f1, 0);
px = hermite_interp(
dist_eff, dist_intpol_right, maxGeometryInteractionDistance, f, 0, f1, 0);
F_rep = e * px;
} else if(dist_eff >= tmp3) { // 3
f = -nominator / fabs(dist_eff); // devided by abs f the effective distance
Expand Down
2 changes: 1 addition & 1 deletion libsimulator/src/Journey.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class FixedTransition : public Transition
BaseStage* next;

public:
FixedTransition(BaseStage* next_) : next(next_){};
FixedTransition(BaseStage* next_) : next(next_) {};

BaseStage* NextStage() override { return next; }
};
Expand Down
4 changes: 1 addition & 3 deletions libsimulator/src/Mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,7 @@ std::vector<glm::vec2> Mesh::FVertices() const
std::begin(vertices),
std::end(vertices),
std::back_inserter(f_vertices),
[](const auto& v) {
return glm::vec2{v.x, v.y};
});
[](const auto& v) { return glm::vec2{v.x, v.y}; });
return f_vertices;
}

Expand Down
2 changes: 1 addition & 1 deletion libsimulator/src/NeighborhoodSearch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class NeighborhoodSearch
}

public:
explicit NeighborhoodSearch(double cellSize) : _cellSize(cellSize){};
explicit NeighborhoodSearch(double cellSize) : _cellSize(cellSize) {};

void AddAgent(const Value& item)
{
Expand Down
2 changes: 1 addition & 1 deletion libsimulator/src/Point.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Point
double y{};

public:
Point(double x = 0, double y = 0) : x(x), y(y){};
Point(double x = 0, double y = 0) : x(x), y(y) {};

/// Norm
double Norm() const;
Expand Down
2 changes: 1 addition & 1 deletion libsimulator/src/SocialForceModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdexcept>

SocialForceModel::SocialForceModel(double bodyForce_, double friction_)
: bodyForce(bodyForce_), friction(friction_){};
: bodyForce(bodyForce_), friction(friction_) {};

OperationalModelType SocialForceModel::Type() const
{
Expand Down

0 comments on commit f8edbbd

Please sign in to comment.