Add function parser

This commit is contained in:
Иван Ивашкин
2024-12-15 15:47:04 +05:00
parent 7c9bc1856b
commit 33820e972b
7 changed files with 42 additions and 6 deletions

View File

@@ -23,8 +23,8 @@ namespace StructureHelper.Windows.MainGraph
private const string DEFAULT_NAME = "Put function name here...";
private const string DEFAULT_DESCRIPTION = "Put function description here...";
private const string DEFAULT_FORMULA = "x^2";
private const double DEFAULT_LEFT_BOUND = -500;
private const double DEFAULT_RIGHT_BOUND = 500;
private const double DEFAULT_LEFT_BOUND = 1;
private const double DEFAULT_RIGHT_BOUND = 1000;
private const int DEFAULT_STEP = 100;
private const int MAX_STEP = 1000;
public char GREATER { get; } = '\u2265';
@@ -171,6 +171,8 @@ namespace StructureHelper.Windows.MainGraph
(Function as FormulaFunction).Step = Step;
(Function as FormulaFunction).Formula = Formula;
Function.Color = Color;
Function.MinArg = LeftBound;
Function.MaxArg = RightBound;
var window = parameter as Window;
if (LeftBound > RightBound)
{

View File

@@ -111,7 +111,7 @@ namespace StructureHelper.Windows.MainGraph
f2.Name = "Формульная системная функция";
f2.Formula = "x^2";
f2.Step = 100;
f2.MinArg = -1000;
f2.MinArg = 1;
f2.MaxArg = 1000;
f2.IsUser = false;
f2.Description = "Описание формульной системной функции";