mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[poincare/expression] Fix typo in nextIntersection
The approximative solution should be rounded up to zero if it is dominated by the solver's precision.
This commit is contained in:
committed by
EmilieNumworks
parent
4da9f34993
commit
9a79081b47
@@ -1003,7 +1003,7 @@ Coordinate2D<double> Expression::nextIntersection(const char * symbol, double st
|
||||
return expression0->approximateWithValueForSymbol(symbol, x, context, complexFormat, angleUnit)-expression1->approximateWithValueForSymbol(symbol, x, context, complexFormat, angleUnit);
|
||||
}, context, complexFormat, angleUnit, expression);
|
||||
Coordinate2D<double> result(resultAbscissa, approximateWithValueForSymbol(symbol, resultAbscissa, context, complexFormat, angleUnit));
|
||||
if (std::fabs(result.x2()) < step*k_solverPrecision) {
|
||||
if (std::fabs(result.x2()) < std::fabs(step)*k_solverPrecision) {
|
||||
result.setX2(0.0);
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user