Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+9
@@ -0,0 +1,9 @@
|
||||
ADD_LIBRARY(GBL_Global INTERFACE)
|
||||
TARGET_SOURCES(GBL_Global INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Constants.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/Types.hpp
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(GBL_Global
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
// **************************************************************************
|
||||
//
|
||||
// (C) Copyright 2009 Swiss SIMTEC AG
|
||||
//
|
||||
// **************************************************************************
|
||||
//
|
||||
// $HeadURL$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $LastChangedRevision$
|
||||
//
|
||||
// **************************************************************************
|
||||
|
||||
#ifndef CONSTANTS_HPP
|
||||
#define CONSTANTS_HPP 1
|
||||
|
||||
|
||||
//============================================================================
|
||||
// additional include file(s)
|
||||
//============================================================================
|
||||
#include "Types.hpp"
|
||||
|
||||
namespace N_SST
|
||||
{
|
||||
|
||||
//==========================================================================
|
||||
// constant definitions
|
||||
//==========================================================================
|
||||
|
||||
// Archimedes' Constant
|
||||
//---------------------
|
||||
const Float64 PI = 3.141592653589793;
|
||||
|
||||
// Natural Logarithmic Base
|
||||
//-------------------------
|
||||
const Float64 E = 2.718281828459045;
|
||||
|
||||
// acceleration due to gravity m/s*s
|
||||
//----------------------------------
|
||||
const Float64 G = 9.81;
|
||||
|
||||
// Euler's Constant
|
||||
//-----------------
|
||||
const Float64 GAMMA = 0.577215664901532;
|
||||
|
||||
// Golden Ratio
|
||||
//-------------
|
||||
const Float64 PHI = 1.618033988749894;
|
||||
|
||||
const Float64 PI_OVER_2 = PI / 2.0;
|
||||
const Float64 PI_OVER_4 = PI / 4.0;
|
||||
const Float64 TWO_PI = PI * 2.0;
|
||||
const Float64 ONE_OVER_TWO_PI = 1.0 / TWO_PI;
|
||||
const Float64 INV_PI = 0.318309886183790;
|
||||
const Float64 INV_E = 0.367879441171442;
|
||||
|
||||
const Float64 INV_PI_OVER_180 = 180.0 / PI;
|
||||
const Float64 PI_OVER_180 = PI / 180.0;
|
||||
|
||||
const Float64 ZERO_CELSIUS_IN_KELVIN = 273.16;
|
||||
|
||||
} // namespace N_SST
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// **************************************************************************
|
||||
//
|
||||
// (C) Copyright 2009 Swiss SIMTEC AG
|
||||
//
|
||||
// **************************************************************************
|
||||
//
|
||||
// $HeadURL$
|
||||
// $LastChangedBy$
|
||||
// $LastChangedDate$
|
||||
// $LastChangedRevision$
|
||||
//
|
||||
// **************************************************************************
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
using Float64 = double;
|
||||
|
||||
// just renamed to use stdint stuff
|
||||
using SInt8 = int8_t;
|
||||
using UInt8 = uint8_t;
|
||||
using SInt16 = int16_t;
|
||||
using UInt16 = uint16_t;
|
||||
using SInt32 = int32_t;
|
||||
using UInt32 = uint32_t;
|
||||
using SInt64 = int64_t;
|
||||
using UInt64 = uint64_t;
|
||||
Reference in new issue
Block a user