Skip to content

Commit

Permalink
fix use of pi in example
Browse files Browse the repository at this point in the history
  • Loading branch information
markaren committed Jan 2, 2025
1 parent 012643d commit 9702186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions export/examples/SimplePendulum/simple_pendulum.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

#include <fmu4cpp/fmu_base.hpp>

#define _USE_MATH_DEFINES
#include <cmath>

using namespace fmu4cpp;

constexpr double pi = 3.14159265358979323846;

class SimplePendulum : public fmu_base {
public:
Expand Down Expand Up @@ -42,7 +42,7 @@ class SimplePendulum : public fmu_base {
}

void reset() override {
angle_ = M_PI / 4;// 45 degrees
angle_ = pi / 4;// 45 degrees
angularVelocity_ = 0;
gravity_ = -9.81;
length_ = 1.0;
Expand Down

0 comments on commit 9702186

Please sign in to comment.