wPlot2D
version: 0.1.0
A lightweight C++ library for clear and customizable 2D scientific plots.
Loading...
Searching...
No Matches
wMathUtils.hpp
Go to the documentation of this file.
1
/*
2
+---------------------------------------------------------------------------------------------------------------------------------------------------+
3
Created by Wilfried Koch.
4
Copyright @ 2025 Wilfried Koch. All rights reserved.
5
+---------------------------------------------------------------------------------------------------------------------------------------------------+
6
*/
7
8
#ifndef W_MATH_UTILS_HPP
9
#define W_MATH_UTILS_HPP
10
11
#pragma GCC diagnostic push
12
#pragma GCC diagnostic ignored "-Wfloat-equal"
13
#include <SFML/System/Vector2.hpp>
14
#pragma GCC diagnostic pop
15
16
#include <cmath>
17
#include <vector>
18
#include <algorithm>
19
#include <stdexcept>
20
21
namespace
wEngine
22
{
23
37
class
MathUtils
38
{
39
public
:
57
[[nodiscard]]
static
std::vector< double >
linspace
(
double
start,
double
end,
size_t
nbPoints );
58
};
59
60
}
//End of namespace wEngine
61
62
#endif
wEngine::MathUtils
Provides common mathematical helper functions for plotting and geometry.
Definition
wMathUtils.hpp:38
wEngine::MathUtils::linspace
static std::vector< double > linspace(double start, double end, size_t nbPoints)
Generates a linearly spaced vector of values between two bounds.
Definition
wMathUtils.cpp:17
wEngine
Definition
wColorComponent.cpp:9
src
srcUtils
wMathUtils.hpp
Generated by
1.14.0