initial push

This commit is contained in:
2026-06-23 09:35:43 +02:00
parent 683a33967d
commit b842990cd4
44 changed files with 4738 additions and 92 deletions
+96
View File
@@ -0,0 +1,96 @@
/**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* PANIC
* Portable Algorithms and Numerics In C++
*
* Scientific computing from scratch, with feeling.
*
* Copyright (c) 2026 Michelle Bausager
*
* This file is part of PANIC.
*
* PANIC is free software licensed under the GNU General Public License v3.0 or later.
* You may redistribute and/or modify it under the terms of the GPL.
*
* PANIC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the LICENSE file for the full license text.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Project Name: PANIC
* Module Name: config
* File Name: constants.hpp
* Revision: 0.1.0
* Date: 20-06-2026
* Author: Michelle Bausager
*
* Description:
* Defines which types will be used in the rest of the libraries.
*
*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
#pragma once
//---------------------------------------------------------------------------------------------------------------------------
// INCLUDE DESCRIPTION
//---------------------------------------------------------------------------------------------------------------------------
#include <config/types.hpp> // Use to define types.
//---------------------------------------------------------------------------------------------------------------------------
// DEFINE DESCRIPTION
//---------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------
// TYPE DESCRIPTION
//---------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------
// VARIABLE DESCRIPTION
//---------------------------------------------------------------------------------------------------------------------------
namespace panic {
//---------------------------------------------------------------------------------------------------------------------------
// Type Name : panic::pi
//
// Description:
// Default difinition of pi (3.14159265358979323846) used inside PANIC.
// static_cast makes sure the right number of decimals are used when defining the constant.
//
// Underlying Type:
// panic::real_t
//---------------------------------------------------------------------------------------------------------------------------
static const panic::real_t pi = static_cast<panic::real_t>(3.14159265358979323846);
//---------------------------------------------------------------------------------------------------------------------------
//
// Type Name : panic::tau
//
// Description:
// Default difinition of tau (6.28318530717958647692) used inside PANIC.
// static_cast makes sure the right number of decimals are used when defining the constant.
//
// Underlying Type:
// panic::real_t
//---------------------------------------------------------------------------------------------------------------------------
static const panic::real_t tau = static_cast<panic::real_t>(6.28318530717958647692);
//---------------------------------------------------------------------------------------------------------------------------
//
// Type Name : panic::e
//
// Description:
// Default difinition of eulers number, e (2.71828182845904523536) used inside PANIC.
// static_cast makes sure the right number of decimals are used when defining the constant.
//
// Underlying Type:
// panic::real_t
//---------------------------------------------------------------------------------------------------------------------------
static const panic::real_t e = static_cast<panic::real_t>(2.71828182845904523536);
} // namespace panic
//---------------------------------------------------------------------------------------------------------------------------
// FUNCTION PROTOTYPE
//---------------------------------------------------------------------------------------------------------------------------