mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-07 10:05:55 +01:00
Infinity is now a math constant
This commit is contained in:
parent
5641f3b481
commit
810c860256
@ -72,8 +72,9 @@ namespace MATH_NAMESPACE
|
||||
DMat varToCorr(const DMat &var);
|
||||
|
||||
// Constants
|
||||
const double pi = 3.1415926535897932384626433832795028841970;
|
||||
const double e = 2.7182818284590452353602874713526624977572;
|
||||
constexpr double pi = 3.1415926535897932384626433832795028841970;
|
||||
constexpr double e = 2.7182818284590452353602874713526624977572;
|
||||
constexpr double inf = std::numeric_limits<double>::infinity();
|
||||
}
|
||||
|
||||
|
||||
|
@ -689,8 +689,8 @@ void MathInterpreter::compile(RunContext &context)
|
||||
{
|
||||
if (root_)
|
||||
{
|
||||
context.addVariable("pi", Math::pi);
|
||||
context.addVariable("inf", HUGE_VAL);
|
||||
context.addVariable("pi", Math::pi);
|
||||
context.addVariable("inf", Math::inf);
|
||||
ADD_STDMATH_FUNCS(context);
|
||||
root_->compile(program_, context);
|
||||
for (unsigned int i = 0; i < program_.size(); ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user