This commit is contained in:
Pepe Rivera
2020-01-14 13:52:57 -08:00
committed by GitHub
parent 027eab12a3
commit ca0b3d83e8
4 changed files with 34 additions and 4 deletions

View File

@@ -29,7 +29,9 @@ namespace GraphControl
// Check for unicode characters of less than, less than or equal to, greater than and greater than or equal to.
if (expr.find(L">&#x3E;<") != wstring_view::npos || expr.find(L">&#x3C;<") != wstring_view::npos || expr.find(L">&#x2265;<") != wstring_view::npos
|| expr.find(L">&#x2264;<") != wstring_view::npos)
|| expr.find(L">&#x2264;<") != wstring_view::npos || expr.find(8805) != wstring_view::npos || expr.find(8804) != wstring_view::npos
|| expr.find(L">&lt;<") != wstring_view::npos
|| expr.find(L">&gt;<") != wstring_view::npos)
{
request = L"<mrow><mi>plotIneq2D</mi><mfenced separators=\"\">";
}
@@ -37,6 +39,12 @@ namespace GraphControl
{
request = L"<mrow><mi>plotEq2d</mi><mfenced separators=\"\">";
}
// If the expression contains both x and y but no equal or inequality sign, then that cannot be graphed.
else if (expr.find(L">x<") != wstring_view::npos && (expr.find(L">y<") != wstring_view::npos))
{
return nullptr;
}
// Else default to plot2d
else
{
request = L"<mrow><mi>plot2d</mi><mfenced separators=\"\">";