Skip to content

Commit

Permalink
Replace includes and pi in unit test. (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
iglesias authored May 24, 2024
1 parent 4c2f59e commit d60b9dc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/unit/data.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#include <cmath>
#include <tapkee/defines/types.hpp>

#include <fstream>

#ifndef M_PI
#define M_PI (3.14159265358979323846)
#endif
#include <numbers>

tapkee::DenseMatrix swissroll(int N)
{
tapkee::DenseVector tt = (3.0 * M_PI / 4.0) * (tapkee::DenseVector::Random(N).array() + 0.5);
tapkee::DenseVector tt = (3.0 * std::numbers::pi_v<double> / 4.0) *
(tapkee::DenseVector::Random(N).array() + 0.5);
tapkee::DenseVector height = tapkee::DenseVector::Random(N).array() - 0.5;
tapkee::DenseMatrix X(N, 3);
X.col(0) = tt.array() * tt.array().cos();
Expand Down

0 comments on commit d60b9dc

Please sign in to comment.