[apps/shared] CartesianFunction: evaluating function out of its domain

returns NAN
This commit is contained in:
Émilie Feral
2019-08-30 15:58:32 +02:00
parent 2d5b60640d
commit d5730e2702

View File

@@ -203,7 +203,7 @@ CartesianFunction::CartesianFunctionRecordDataBuffer * CartesianFunction::record
template<typename T>
Coordinate2D<T> CartesianFunction::templatedApproximateAtParameter(T t, Poincare::Context * context) const {
if (isCircularlyDefined(context)) {
if (isCircularlyDefined(context) || t < tMin() || t > tMax()) {
return Coordinate2D<T>(NAN, NAN);
}
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;