FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright (c) 2024-present FERS Contributors (see AUTHORS.md).
4//
5// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
6
7/**
8 * @file config.h
9 * @brief Global configuration file for the project.
10 *
11 * This file contains type definitions and constants used throughout the project
12 * for real and complex number types, as well as mathematical constants like π
13 * and machine epsilon.
14 */
15
16#pragma once
17
18#include <complex>
19#include <numbers>
20
21/**
22 * @brief Type for real numbers.
23 *
24 * This typedef defines the real number type to be used throughout the project
25 * as a double-precision floating-point number.
26 */
27using RealType = double;
28
29/**
30 * @brief Type for complex numbers.
31 *
32 * This typedef defines the complex number type, which is based on the RealType
33 * definition for double-precision floating-point real and imaginary parts.
34 */
35using ComplexType = std::complex<RealType>;
36
37/**
38 * @brief Mathematical constant π (pi).
39 *
40 * This constant holds the value of π (pi) using the RealType, ensuring precision
41 * for calculations involving this constant throughout the project.
42 */
43constexpr RealType PI = std::numbers::pi_v<RealType>;
44
45/**
46 * @brief Machine epsilon for real numbers.
47 *
48 * This constant defines the smallest representable difference (machine epsilon)
49 * between two RealType values, ensuring precision control in numerical operations.
50 */
51constexpr RealType EPSILON = std::numeric_limits<RealType>::epsilon();
double RealType
Type for real numbers.
Definition config.h:27
constexpr RealType EPSILON
Machine epsilon for real numbers.
Definition config.h:51
std::complex< RealType > ComplexType
Type for complex numbers.
Definition config.h:35
constexpr RealType PI
Mathematical constant π (pi).
Definition config.h:43