From 4b3d676f30ee697f40104314213a051d1bbbd42d Mon Sep 17 00:00:00 2001 From: John Dupuy Date: Tue, 26 Sep 2023 11:49:32 -0500 Subject: [PATCH] first stages for making more universal --- .gitignore | 5 +- CMakeLists.txt | 9 + MbDCode/AngleZIecJec.cpp | 2 +- MbDCode/Array.h | 2 +- MbDCode/CMakeLists.txt | 273 ++++++++++++++++++++++++++++++ MbDCode/FullColumn.h | 2 +- MbDCode/FullMatrix.h | 16 +- MbDCode/FullRow.h | 2 +- MbDCode/FullVector.h | 3 +- MbDCode/GearConstraintIJ.h | 2 +- MbDCode/GearConstraintIqcJc.cpp | 2 +- MbDCode/GearConstraintIqcJqc.cpp | 2 +- MbDCode/Item.cpp | 4 +- MbDCode/Numeric.cpp | 2 +- MbDCode/OrbitAnglezIecJec.cpp | 4 +- MbDCode/OrbitAnglezIeqcJec.cpp | 2 +- MbDCode/OrbitAnglezIeqcJec.h | 2 +- MbDCode/OrbitAnglezIeqcJeqc.cpp | 2 +- MbDCode/OrbitAnglezIeqcJeqc.h | 2 +- MbDCode/ScrewConstraintIJ.cpp | 2 +- MbDCode/ScrewConstraintIqcJc.cpp | 2 +- MbDCode/ScrewConstraintIqcJqc.cpp | 2 +- MbDCode/SymbolicParser.cpp | 2 +- MbDCode/corecrt_math_defines.h | 30 ++++ 24 files changed, 346 insertions(+), 30 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 MbDCode/CMakeLists.txt create mode 100644 MbDCode/corecrt_math_defines.h diff --git a/.gitignore b/.gitignore index 774534a..6ead354 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,7 @@ .vs x64/ -*.bak \ No newline at end of file +*.bak + +cmake-build-debug +.idea diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cec7723 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,9 @@ +cmake_minimum_required(VERSION 3.10) + +project(MbDCodeLib) + +add_executable(MbDCode MbDCode/MbDCode.cpp) +add_subdirectory(MbDCode) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/MbDCode/AngleZIecJec.cpp b/MbDCode/AngleZIecJec.cpp index 443d225..dbaa8fd 100644 --- a/MbDCode/AngleZIecJec.cpp +++ b/MbDCode/AngleZIecJec.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" #include "AngleZIecJec.h" #include "Numeric.h" diff --git a/MbDCode/Array.h b/MbDCode/Array.h index b654812..db8e407 100644 --- a/MbDCode/Array.h +++ b/MbDCode/Array.h @@ -29,7 +29,7 @@ namespace MbD { Array(std::vector vec) : std::vector(vec) {} Array(int count) : std::vector(count) {} Array(int count, const T& value) : std::vector(count, value) {} - Array(std::vector::iterator begin, std::vector::iterator end) : std::vector(begin, end) {} + Array(typename std::vector::const_iterator begin, typename std::vector::const_iterator end) : std::vector(begin, end) {} Array(std::initializer_list list) : std::vector{ list } {} virtual void initialize(); void copyFrom(std::shared_ptr> x); diff --git a/MbDCode/CMakeLists.txt b/MbDCode/CMakeLists.txt new file mode 100644 index 0000000..6387398 --- /dev/null +++ b/MbDCode/CMakeLists.txt @@ -0,0 +1,273 @@ +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +add_executable(new_target + MbDCode.cpp + Abs.cpp + AbsConstraint.cpp + AccICKineNewtonRaphson.cpp + AccICNewtonRaphson.cpp + AccKineNewtonRaphson.cpp + AccNewtonRaphson.cpp + AngleJoint.cpp + AngleZIecJec.cpp + AngleZIeqcJec.cpp + AngleZIeqcJeqc.cpp + AnyGeneralSpline.cpp + AnyPosICNewtonRaphson.cpp + ArcTan.cpp + ArcTan2.cpp + Array.cpp + ASMTAnimationParameters.cpp + ASMTAssembly.cpp + ASMTConstantGravity.cpp + ASMTConstraintSet.cpp + ASMTCylindricalJoint.cpp + ASMTExtrusion.cpp + ASMTFixedJoint.cpp + ASMTForceTorque.cpp + ASMTGeneralMotion.cpp + ASMTItem.cpp + ASMTItemIJ.cpp + ASMTJoint.cpp + ASMTKinematicIJ.cpp + ASMTMarker.cpp + ASMTMotion.cpp + ASMTPart.cpp + ASMTPointInPlaneJoint.cpp + ASMTPrincipalMassMarker.cpp + ASMTRefCurve.cpp + ASMTRefItem.cpp + ASMTRefPoint.cpp + ASMTRefSurface.cpp + ASMTRevoluteJoint.cpp + ASMTRotationalMotion.cpp + ASMTSimulationParameters.cpp + ASMTSpatialContainer.cpp + ASMTSpatialItem.cpp + ASMTSphericalJoint.cpp + ASMTTime.cpp + ASMTTranslationalMotion.cpp + ASMTTranslationalJoint.cpp + ASMTUniversalJoint.cpp + AtPointConstraintIJ.cpp + AtPointConstraintIqcJc.cpp + AtPointConstraintIqcJqc.cpp + AtPointConstraintIqctJqc.cpp + AtPointJoint.cpp + BasicIntegrator.cpp + BasicQuasiIntegrator.cpp + BasicUserFunction.cpp + CADSystem.cpp + CartesianFrame.cpp + CompoundJoint.cpp + Constant.cpp + ConstantGravity.cpp + ConstantVelocityJoint.cpp + Constraint.cpp + ConstraintIJ.cpp + ConstVelConstraintIJ.cpp + ConstVelConstraintIqcJc.cpp + ConstVelConstraintIqcJqc.cpp + Cosine.cpp + CREATE.cpp + CylindricalJoint.cpp + CylSphJoint.cpp + DifferentiatedGeneralSpline.cpp + EndFrameqct2.cpp + EulerAngles.cpp + EulerAnglesDDot.cpp + EulerAnglesDot.cpp + Exponential.cpp + ExternalSystem.cpp + FunctionFromData.cpp + FunctionXcParameter.cpp + FunctionXY.cpp + GeneralSpline.cpp + Ln.cpp + Log10.cpp + LogN.cpp + Negative.cpp + PosVelAccData.cpp + DiagonalMatrix.cpp + DifferenceOperator.cpp + DirectionCosineConstraintIJ.cpp + DirectionCosineConstraintIqcJc.cpp + DirectionCosineConstraintIqcJqc.cpp + DirectionCosineConstraintIqctJqc.cpp + DirectionCosineIecJec.cpp + DirectionCosineIeqcJec.cpp + DirectionCosineIeqcJeqc.cpp + DirectionCosineIeqctJeqc.cpp + DiscontinuityError.cpp + DispCompIecJecIe.cpp + DispCompIecJecKec.cpp + DispCompIecJecKeqc.cpp + DispCompIecJecO.cpp + DispCompIeqcJecIe.cpp + DispCompIeqcJecKeqc.cpp + DispCompIeqcJecO.cpp + DispCompIeqcJeqcIe.cpp + DispCompIeqcJeqcKeqc.cpp + DispCompIeqcJeqcKeqct.cpp + DispCompIeqcJeqcO.cpp + DispCompIeqctJeqcIe.cpp + DispCompIeqctJeqcKeqct.cpp + DispCompIeqctJeqcO.cpp + DistanceConstraintIJ.cpp + DistanceConstraintIqcJc.cpp + DistanceConstraintIqcJqc.cpp + DistanceConstraintIqctJqc.cpp + DistancexyConstraintIJ.cpp + DistancexyConstraintIqcJc.cpp + DistancexyConstraintIqcJqc.cpp + DistIecJec.cpp + DistIeqcJec.cpp + DistIeqcJeqc.cpp + DistIeqctJeqc.cpp + DistxyIecJec.cpp + DistxyIeqcJec.cpp + DistxyIeqcJeqc.cpp + DistxyIeqctJeqc.cpp + EndFramec.cpp + EndFrameqc.cpp + EndFrameqct.cpp + EulerAngleszxz.cpp + EulerAngleszxzDDot.cpp + EulerAngleszxzDot.cpp + EulerArray.cpp + EulerConstraint.cpp + EulerParameters.cpp + EulerParametersDDot.cpp + EulerParametersDot.cpp + ExpressionX.cpp + FixedJoint.cpp + ForceTorqueData.cpp + ForceTorqueItem.cpp + FullColumn.cpp + FullMatrix.cpp + FullMotion.cpp + FullRow.cpp + Function.cpp + FunctionWithManyArgs.cpp + FunctionX.cpp + GearConstraintIJ.cpp + GearConstraintIqcJc.cpp + GearConstraintIqcJqc.cpp + GearJoint.cpp + GEFullMat.cpp + GEFullMatFullPv.cpp + GEFullMatParPv.cpp + GESpMat.cpp + GESpMatFullPv.cpp + GESpMatFullPvPosIC.cpp + GESpMatParPv.cpp + GESpMatParPvMarko.cpp + GESpMatParPvMarkoFast.cpp + GESpMatParPvPrecise.cpp + ICKineIntegrator.cpp + IndependentVariable.cpp + InLineJoint.cpp + InPlaneJoint.cpp + Integrator.cpp + IntegratorInterface.cpp + Item.cpp + Joint.cpp + KineIntegrator.cpp + KinematicIeJe.cpp + LDUFullMatParPv.cpp + LDUSpMat.cpp + LDUSpMatParPv.cpp + LDUSpMatParPvMarko.cpp + LDUSpMatParPvPrecise.cpp + LinearMultiStepMethod.cpp + LineInPlaneJoint.cpp + MarkerFrame.cpp + Math.cpp + MatrixDecomposition.cpp + MatrixGaussElimination.cpp + MatrixLDU.cpp + MatrixSolver.cpp + MaximumIterationError.cpp + NewtonRaphson.cpp + NewtonRaphsonError.cpp + NoRotationJoint.cpp + NotKinematicError.cpp + Numeric.cpp + OrbitAnglezIecJec.cpp + OrbitAnglezIeqcJec.cpp + OrbitAnglezIeqcJeqc.cpp + Orientation.cpp + ParallelAxesJoint.cpp + Part.cpp + PartFrame.cpp + PerpendicularJoint.cpp + PlanarJoint.cpp + PointInLineJoint.cpp + PointInPlaneJoint.cpp + PosICKineNewtonRaphson.cpp + PosICNewtonRaphson.cpp + PosKineNewtonRaphson.cpp + PosNewtonRaphson.cpp + Power.cpp + PrescribedMotion.cpp + Product.cpp + QuasiIntegrator.cpp + RackPinConstraintIJ.cpp + RackPinConstraintIqcJc.cpp + RackPinConstraintIqcJqc.cpp + RackPinJoint.cpp + Reciprocal.cpp + RedundantConstraint.cpp + RevCylJoint.cpp + RevoluteJoint.cpp + RowTypeMatrix.cpp + ScalarNewtonRaphson.cpp + ScrewConstraintIJ.cpp + ScrewConstraintIqcJc.cpp + ScrewConstraintIqcJqc.cpp + ScrewJoint.cpp + SimulationStoppingError.cpp + Sine.cpp + SingularMatrixError.cpp + Solver.cpp + SparseColumn.cpp + SparseMatrix.cpp + SparseRow.cpp + SparseVector.cpp + SphericalJoint.cpp + SphSphJoint.cpp + StableBackwardDifference.cpp + LDUFullMat.cpp + StateData.cpp + Sum.cpp + Symbolic.cpp + SymbolicParser.cpp + SyntaxError.cpp + System.cpp + SystemNewtonRaphson.cpp + SystemSolver.cpp + Time.cpp + TooManyTriesError.cpp + TooSmallStepSizeError.cpp + Translation.cpp + TranslationalJoint.cpp + TranslationConstraintIJ.cpp + TranslationConstraintIqcJc.cpp + TranslationConstraintIqcJqc.cpp + TranslationConstraintIqctJqc.cpp + Units.cpp + UniversalJoint.cpp + UserFunction.cpp + Variable.cpp + FullVector.cpp + VectorNewtonRaphson.cpp + VelICKineSolver.cpp + VelICSolver.cpp + VelKineSolver.cpp + VelSolver.cpp + ZRotation.cpp + ZTranslation.cpp +) + + diff --git a/MbDCode/FullColumn.h b/MbDCode/FullColumn.h index e9dcb36..34b0318 100644 --- a/MbDCode/FullColumn.h +++ b/MbDCode/FullColumn.h @@ -33,7 +33,7 @@ namespace MbD { FullColumn(std::vector vec) : FullVector(vec) {} FullColumn(int count) : FullVector(count) {} FullColumn(int count, const T& value) : FullVector(count, value) {} - FullColumn(std::vector::iterator begin, std::vector::iterator end) : FullVector(begin, end) {} + FullColumn(typename std::vector::const_iterator begin, typename std::vector::const_iterator end) : FullVector(begin, end) {} FullColumn(std::initializer_list list) : FullVector{ list } {} FColsptr plusFullColumn(FColsptr fullCol); FColsptr minusFullColumn(FColsptr fullCol); diff --git a/MbDCode/FullMatrix.h b/MbDCode/FullMatrix.h index fd792a7..0b2817e 100644 --- a/MbDCode/FullMatrix.h +++ b/MbDCode/FullMatrix.h @@ -8,7 +8,7 @@ #pragma once -#include +#include "corecrt_math_defines.h" #include #include "RowTypeMatrix.h" @@ -296,6 +296,13 @@ namespace MbD { row2->atiput(2, 0.0); return rotMat; } + template<> + inline void FullMatrix::zeroSelf() + { + for (int i = 0; i < this->size(); i++) { + this->at(i)->zeroSelf(); + } + } template<> inline void FullMatrix::identity() { this->zeroSelf(); @@ -452,13 +459,6 @@ namespace MbD { assert(false); return 0.0; } - template<> - inline void FullMatrix::zeroSelf() - { - for (int i = 0; i < this->size(); i++) { - this->at(i)->zeroSelf(); - } - } template inline void FullMatrix::zeroSelf() { diff --git a/MbDCode/FullRow.h b/MbDCode/FullRow.h index 8ea5619..b4df0bd 100644 --- a/MbDCode/FullRow.h +++ b/MbDCode/FullRow.h @@ -35,7 +35,7 @@ namespace MbD { FullRow(std::vector vec) : FullVector(vec) {} FullRow(int count) : FullVector(count) {} FullRow(int count, const T& value) : FullVector(count, value) {} - FullRow(std::vector::iterator begin, std::vector::iterator end) : FullVector(begin, end) {} + FullRow(typename std::vector::const_iterator begin, typename std::vector::const_iterator end) : FullVector(begin, end) {} FullRow(std::initializer_list list) : FullVector{ list } {} FRowsptr times(T a); FRowsptr negated(); diff --git a/MbDCode/FullVector.h b/MbDCode/FullVector.h index c4193d0..1285c7a 100644 --- a/MbDCode/FullVector.h +++ b/MbDCode/FullVector.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include "Array.h" @@ -21,7 +22,7 @@ namespace MbD { FullVector(std::vector vec) : Array(vec) {} FullVector(int count) : Array(count) {} FullVector(int count, const T& value) : Array(count, value) {} - FullVector(std::vector::iterator begin, std::vector::iterator end) : Array(begin, end) {} + FullVector(typename std::vector::const_iterator begin, typename std::vector::const_iterator end) : Array(begin, end) {} FullVector(std::initializer_list list) : Array{ list } {} double dot(std::shared_ptr> vec); void atiplusNumber(int i, T value); diff --git a/MbDCode/GearConstraintIJ.h b/MbDCode/GearConstraintIJ.h index 4092d59..7ffd8b7 100644 --- a/MbDCode/GearConstraintIJ.h +++ b/MbDCode/GearConstraintIJ.h @@ -9,7 +9,7 @@ #pragma once #include "ConstraintIJ.h" -#include "OrbitAngleZIecJec.h" +#include "OrbitAnglezIecJec.h" namespace MbD { class GearConstraintIJ : public ConstraintIJ diff --git a/MbDCode/GearConstraintIqcJc.cpp b/MbDCode/GearConstraintIqcJc.cpp index dd01774..cd348ff 100644 --- a/MbDCode/GearConstraintIqcJc.cpp +++ b/MbDCode/GearConstraintIqcJc.cpp @@ -9,7 +9,7 @@ #include "GearConstraintIqcJc.h" #include "EndFrameqc.h" #include "CREATE.h" -#include "OrbitAngleZIeqcJec.h" +#include "OrbitAnglezIeqcJec.h" using namespace MbD; diff --git a/MbDCode/GearConstraintIqcJqc.cpp b/MbDCode/GearConstraintIqcJqc.cpp index 0793ed6..717c815 100644 --- a/MbDCode/GearConstraintIqcJqc.cpp +++ b/MbDCode/GearConstraintIqcJqc.cpp @@ -8,7 +8,7 @@ #include "GearConstraintIqcJqc.h" #include "EndFrameqc.h" -#include "OrbitAngleZIeqcJeqc.h" +#include "OrbitAnglezIeqcJeqc.h" #include "CREATE.h" using namespace MbD; diff --git a/MbDCode/Item.cpp b/MbDCode/Item.cpp index e20f225..820b2e6 100644 --- a/MbDCode/Item.cpp +++ b/MbDCode/Item.cpp @@ -6,9 +6,9 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +//#include #include -#include +//#include #include #include "Item.h" diff --git a/MbDCode/Numeric.cpp b/MbDCode/Numeric.cpp index e78ee3c..b1fc9a2 100644 --- a/MbDCode/Numeric.cpp +++ b/MbDCode/Numeric.cpp @@ -7,7 +7,7 @@ ***************************************************************************/ #include -#include +#include "corecrt_math_defines.h" #include #include "Numeric.h" diff --git a/MbDCode/OrbitAnglezIecJec.cpp b/MbDCode/OrbitAnglezIecJec.cpp index c53166e..3a1ec8b 100644 --- a/MbDCode/OrbitAnglezIecJec.cpp +++ b/MbDCode/OrbitAnglezIecJec.cpp @@ -6,9 +6,9 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" -#include "OrbitAngleZIecJec.h" +#include "OrbitAnglezIecJec.h" #include "Numeric.h" using namespace MbD; diff --git a/MbDCode/OrbitAnglezIeqcJec.cpp b/MbDCode/OrbitAnglezIeqcJec.cpp index 1dd5298..b9bb400 100644 --- a/MbDCode/OrbitAnglezIeqcJec.cpp +++ b/MbDCode/OrbitAnglezIeqcJec.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include "OrbitAngleZIeqcJec.h" +#include "OrbitAnglezIeqcJec.h" #include "CREATE.h" #include "DispCompIeqcJecIe.h" diff --git a/MbDCode/OrbitAnglezIeqcJec.h b/MbDCode/OrbitAnglezIeqcJec.h index 65610f3..2788bad 100644 --- a/MbDCode/OrbitAnglezIeqcJec.h +++ b/MbDCode/OrbitAnglezIeqcJec.h @@ -8,7 +8,7 @@ #pragma once -#include "OrbitAngleZIecJec.h" +#include "OrbitAnglezIecJec.h" namespace MbD { class OrbitAngleZIeqcJec : public OrbitAngleZIecJec diff --git a/MbDCode/OrbitAnglezIeqcJeqc.cpp b/MbDCode/OrbitAnglezIeqcJeqc.cpp index 79709c6..b8e689c 100644 --- a/MbDCode/OrbitAnglezIeqcJeqc.cpp +++ b/MbDCode/OrbitAnglezIeqcJeqc.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include "OrbitAngleZIeqcJeqc.h" +#include "OrbitAnglezIeqcJeqc.h" #include "CREATE.h" #include "DispCompIeqcJeqcIe.h" diff --git a/MbDCode/OrbitAnglezIeqcJeqc.h b/MbDCode/OrbitAnglezIeqcJeqc.h index ec0f843..8455372 100644 --- a/MbDCode/OrbitAnglezIeqcJeqc.h +++ b/MbDCode/OrbitAnglezIeqcJeqc.h @@ -8,7 +8,7 @@ #pragma once -#include "OrbitAngleZIeqcJec.h" +#include "OrbitAnglezIeqcJec.h" namespace MbD { class OrbitAngleZIeqcJeqc : public OrbitAngleZIeqcJec diff --git a/MbDCode/ScrewConstraintIJ.cpp b/MbDCode/ScrewConstraintIJ.cpp index c63e537..cbfd4e7 100644 --- a/MbDCode/ScrewConstraintIJ.cpp +++ b/MbDCode/ScrewConstraintIJ.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" #include "ScrewConstraintIJ.h" diff --git a/MbDCode/ScrewConstraintIqcJc.cpp b/MbDCode/ScrewConstraintIqcJc.cpp index 74cb241..463954f 100644 --- a/MbDCode/ScrewConstraintIqcJc.cpp +++ b/MbDCode/ScrewConstraintIqcJc.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" #include "ScrewConstraintIqcJc.h" #include "EndFrameqc.h" diff --git a/MbDCode/ScrewConstraintIqcJqc.cpp b/MbDCode/ScrewConstraintIqcJqc.cpp index 1ee6649..e02d7fe 100644 --- a/MbDCode/ScrewConstraintIqcJqc.cpp +++ b/MbDCode/ScrewConstraintIqcJqc.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" #include "ScrewConstraintIqcJqc.h" #include "EndFrameqc.h" diff --git a/MbDCode/SymbolicParser.cpp b/MbDCode/SymbolicParser.cpp index ed54b44..ca0c160 100644 --- a/MbDCode/SymbolicParser.cpp +++ b/MbDCode/SymbolicParser.cpp @@ -6,7 +6,7 @@ * See LICENSE file for details about copyright. * ***************************************************************************/ -#include +#include "corecrt_math_defines.h" #include #include diff --git a/MbDCode/corecrt_math_defines.h b/MbDCode/corecrt_math_defines.h new file mode 100644 index 0000000..0d46d29 --- /dev/null +++ b/MbDCode/corecrt_math_defines.h @@ -0,0 +1,30 @@ +// +// corecrt_math_defines.h +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Definitions of useful mathematical constants +// +#pragma once + +#ifndef _MATH_DEFINES_DEFINED +#define _MATH_DEFINES_DEFINED +// Definitions of useful mathematical constants +// +// Define _USE_MATH_DEFINES before including to expose these macro +// definitions for common math constants. These are placed under an #ifdef +// since these commonly-defined names are not part of the C or C++ standards +#define M_E 2.71828182845904523536 // e +#define M_LOG2E 1.44269504088896340736 // log2(e) +#define M_LOG10E 0.434294481903251827651 // log10(e) +#define M_LN2 0.693147180559945309417 // ln(2) +#define M_LN10 2.30258509299404568402 // ln(10) +#define M_PI 3.14159265358979323846 // pi +#define M_PI_2 1.57079632679489661923 // pi/2 +#define M_PI_4 0.785398163397448309616 // pi/4 +#define M_1_PI 0.318309886183790671538 // 1/pi +#define M_2_PI 0.636619772367581343076 // 2/pi +#define M_2_SQRTPI 1.12837916709551257390 // 2/sqrt(pi) +#define M_SQRT2 1.41421356237309504880 // sqrt(2) +#define M_SQRT1_2 0.707106781186547524401 // 1/sqrt(2) +#endif \ No newline at end of file