From 8802a0223269b8dc289ea5e90a2f4c4009c475f3 Mon Sep 17 00:00:00 2001 From: "Jan W. Krieger" Date: Sun, 23 Dec 2018 20:28:38 +0100 Subject: [PATCH] tabs -> whitespaces --- test/simpletest_functionplot/README.md | 34 ++++++++++---------- test/simpletest_parsedfunctionplot/README.md | 8 ++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/test/simpletest_functionplot/README.md b/test/simpletest_functionplot/README.md index 5bcd1244f3..6073bbd7c0 100644 --- a/test/simpletest_functionplot/README.md +++ b/test/simpletest_functionplot/README.md @@ -44,18 +44,18 @@ In any such plot function, you can also use parameters, provided via the second You can also use C++ functors (or function objects): ```c++ - struct SincSqr { - public: - inline SincSqr(double amplitude): a(amplitude) {} - inline double operator()(double x, void* /*params*/) { - return a*sin(x)*sin(x)/x/x; - } - private: - double a; - }; + struct SincSqr { + public: + inline SincSqr(double amplitude): a(amplitude) {} + inline double operator()(double x, void* /*params*/) { + return a*sin(x)*sin(x)/x/x; + } + private: + double a; + }; - // ... - + // ... + JKQTPxFunctionLineGraph* func4=new JKQTPxFunctionLineGraph(plot); func4->set_plotFunction(SincSqr(-8)); func4->set_title("C++ functor $-8*\\sin^2(x)/x^2$"); @@ -64,13 +64,13 @@ You can also use C++ functors (or function objects): ... or simple static C functions: ```c++ - double sinc(double x, void* /*params*/) { - return 10.0*sin(x)/x; - } - - // ... + double sinc(double x, void* /*params*/) { + return 10.0*sin(x)/x; + } + + // ... - JKQTPxFunctionLineGraph* func5=new JKQTPxFunctionLineGraph(plot); + JKQTPxFunctionLineGraph* func5=new JKQTPxFunctionLineGraph(plot); func5->set_plotFunction(&sinc); func5->set_title("static C function $10*\\sin(x)/x$"); plot->addGraph(func5); diff --git a/test/simpletest_parsedfunctionplot/README.md b/test/simpletest_parsedfunctionplot/README.md index 724cffb352..4731c31384 100644 --- a/test/simpletest_parsedfunctionplot/README.md +++ b/test/simpletest_parsedfunctionplot/README.md @@ -18,10 +18,10 @@ In the example in [`test/simpletest_parsedfunctionplot/simpletest_parsedfunction JKQtPlotter* plot=new JKQtPlotter(&mainWin); QLineEdit* edit=new QLineEdit(&mainWin); edit->setToolTip("enter a function in dependence of the variable x and press ENTER to update the graph"); - - // ... - - + + // ... + + // 2. now we add a JKQTPxParsedFunctionLineGraph object, which will draw the function from // the line edit JKQTPxParsedFunctionLineGraph* parsedFunc=new JKQTPxParsedFunctionLineGraph(plot);