From f16d0140f4de1cc6b82a6a7addb369368f76e07c Mon Sep 17 00:00:00 2001 From: "Fernando J. Iglesias Garcia" Date: Fri, 24 May 2024 08:07:40 +0200 Subject: [PATCH] Replace includes and pi in unit test. --- test/unit/data.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/test/unit/data.hpp b/test/unit/data.hpp index 9cdeb05..05a8c2e 100644 --- a/test/unit/data.hpp +++ b/test/unit/data.hpp @@ -1,14 +1,11 @@ -#include +#include -#include - -#ifndef M_PI -#define M_PI (3.14159265358979323846) -#endif +#include 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 / 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();