Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) QuadraticSolver

 

QuadraticSolver is a (console) tool to solve quadratic equations.

 

I felt obliged to program this tool, as a counterweight to PerpetualPC's terribly coded quadratic solver.

 

QuadraticSolver uses the function SolveQuadratic.

 

 

 

 

 

Downloads

 

 

 

 

 

 

Older downloads

 

 

 

 

 

 

External links

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./ToolQuadraticSolver/ToolQuadraticSolverConsole.pro

 

# Go ahead and use Qt.Core: it is about as platform-independent as
# the STL and Boost
QT += core

# Go ahead and use Qt.Gui: it is about as platform-independent as
# the STL and Boost. It is needed for QImage
QT += gui

# Don't define widgets: it would defy the purpose of this console
# application to work non-GUI
#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp

include(../../Classes/CppAbout/CppAbout.pri)
include(../../Classes/CppHelp/CppHelp.pri)
include(../../Classes/CppMenuDialog/CppMenuDialog.pri)
include(../../Classes/CppRichelBilderbeekProgram/CppRichelBilderbeekProgram.pri)
include(../../Classes/CppTrace/CppTrace.pri)
include(ToolQuadraticSolverConsole.pri)

#
#
# Type of compile
#
#

CONFIG(release, debug|release) {
  DEFINES += NDEBUG NTRACE_BILDERBIKKEL
}

QMAKE_CXXFLAGS += -std=c++11 -Wall -Wextra -Weffc++

unix {
  QMAKE_CXXFLAGS += -Werror
}

#
#
# Boost
#
#

win32 {
  INCLUDEPATH += \
    ../../Libraries/boost_1_54_0
}

 

 

 

 

 

Qt project file: ./ToolQuadraticSolver/ToolQuadraticSolverDesktop.pro

 

include(../../DesktopApplication.pri)
include(../../Libraries/Boost.pri)
include(../../Libraries/GeneralConsole.pri)
include(../../Libraries/GeneralDesktop.pri)

include(../../Tools/ToolQuadraticSolver/ToolQuadraticSolverDesktop.pri)

SOURCES += qtmain.cpp

 

 

 

 

 

Qt project file: ./ToolQuadraticSolver/ToolQuadraticSolverWebsite.pro

 

include(../../Tools/Tool/ToolConsole.pri)

 

 

 

 

 

./ToolQuadraticSolver/ToolQuadraticSolverConsole.pri

 

INCLUDEPATH += \
    ../../Tools/ToolQuadraticSolver

SOURCES += \
    ../../Tools/ToolQuadraticSolver/quadraticsolvermaindialog.cpp \
    ../../Tools/ToolQuadraticSolver/quadraticsolvermenudialog.cpp

HEADERS += \
    ../../Tools/ToolQuadraticSolver/quadraticsolvermaindialog.h \
    ../../Tools/ToolQuadraticSolver/quadraticsolvermenudialog.h

RESOURCES += \
    ../../Tools/ToolQuadraticSolver/ToolQuadraticSolver.qrc

OTHER_FILES += \
    ../../Tools/ToolQuadraticSolver/Licence.txt

 

 

 

 

 

./ToolQuadraticSolver/ToolQuadraticSolverDesktop.pri

 

include(../../Tools/ToolQuadraticSolver/ToolQuadraticSolverConsole.pri)

SOURCES += \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermaindialog.cpp \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermenudialog.cpp

HEADERS += \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermaindialog.h \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermenudialog.h

FORMS += \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermaindialog.ui \
    ../../Tools/ToolQuadraticSolver/qtquadraticsolvermenudialog.ui

 

 

 

 

 

./ToolQuadraticSolver/ToolQuadraticSolverWebsite.pri

 

include(../../Tools/ToolQuadraticSolver/ToolQuadraticSolverConsole.pri)

SOURCES +=

HEADERS +=

 

 

 

 

 

./ToolQuadraticSolver/main.cpp

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, solver of quadratic equations
Copyright (C) 2008-2013 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
// From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#include <cassert>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <boost/lexical_cast.hpp>

#include "quadraticsolvermaindialog.h"
#include "quadraticsolvermenudialog.h"

#pragma GCC diagnostic pop



int main()
{
}

 

 

 

 

 

./ToolQuadraticSolver/qtmain.cpp

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, tool to generate random C++ code
Copyright (C) 2007-2014  Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
//From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include <QApplication>
#include "qtquadraticsolvermenudialog.h"
#pragma GCC diagnostic pop

int main(int argc, char *argv[])
{
  QApplication a(argc, argv);
  ribi::QtQuadraticSolverMenuDialog w;
  w.show();
  return a.exec();
}

 

 

 

 

 

./ToolQuadraticSolver/qtquadraticsolvermaindialog.h

 

#ifndef QTQUADRATICSOLVERMAINDIALOG_H
#define QTQUADRATICSOLVERMAINDIALOG_H

#include "qthideandshowdialog.h"

namespace Ui {
  class QtQuadraticSolverMainDialog;
}

namespace ribi {

class QtQuadraticSolverMainDialog : public QtHideAndShowDialog
{
  Q_OBJECT

public:
  explicit QtQuadraticSolverMainDialog(QWidget *parent = 0);
  QtQuadraticSolverMainDialog(const QtQuadraticSolverMainDialog&) = delete;
  QtQuadraticSolverMainDialog& operator=(const QtQuadraticSolverMainDialog&) = delete;
  ~QtQuadraticSolverMainDialog() noexcept;

protected:
  
  void keyPressEvent(QKeyEvent *);

private:
  Ui::QtQuadraticSolverMainDialog *ui;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif

private slots:
  void on_box_a_valueChanged(double arg1);
  void on_box_b_valueChanged(double arg1);
  void on_box_c_valueChanged(double arg1);
  void OnAnyChange();
};

} //~namespace ribi

#endif // QTQUADRATICSOLVERMAINDIALOG_H

 

 

 

 

 

./ToolQuadraticSolver/qtquadraticsolvermaindialog.cpp

 

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include "qtquadraticsolvermaindialog.h"

#include <sstream>
#include <string>
#include <vector>



#include <QKeyEvent>

#include "about.h"
#include "trace.h"
#include "qtaboutdialog.h"
#include "testtimer.h"
#include "quadraticsolvermaindialog.h"
#include "quadraticsolvermenudialog.h"
#include "ui_qtquadraticsolvermaindialog.h"
#pragma GCC diagnostic pop

ribi::QtQuadraticSolverMainDialog::QtQuadraticSolverMainDialog(QWidget *parent) :
    QtHideAndShowDialog(parent),
    ui(new Ui::QtQuadraticSolverMainDialog)
{
  #ifndef NDEBUG
  Test();
  #endif
  ui->setupUi(this);
  OnAnyChange();
}

ribi::QtQuadraticSolverMainDialog::~QtQuadraticSolverMainDialog() noexcept
{
  delete ui;
}

void ribi::QtQuadraticSolverMainDialog::keyPressEvent(QKeyEvent * event)
{
  if (event->key() == Qt::Key_Escape) { close(); return; }
}

void ribi::QtQuadraticSolverMainDialog::OnAnyChange()
{
  const double a = ui->box_a->value();
  const double b = ui->box_b->value();
  const double c = ui->box_c->value();
  const std::vector<double> v = QuadraticSolverMainDialog::SolveQuadratic(a,b,c);
  const std::size_t sz = v.size();
  std::stringstream s;
  s << "Number of solutions: " << sz;
  for (std::size_t i=0; i!=sz; ++i)
  {
    s << "\n#" << i << ": " << v[i];
  }
  const std::string text = s.str();
  ui->text->setPlainText(text.c_str());
}


void ribi::QtQuadraticSolverMainDialog::on_box_a_valueChanged(double)
{
  OnAnyChange();
}

void ribi::QtQuadraticSolverMainDialog::on_box_b_valueChanged(double)
{
  OnAnyChange();
}

void ribi::QtQuadraticSolverMainDialog::on_box_c_valueChanged(double)
{
  OnAnyChange();
}

#ifndef NDEBUG
void ribi::QtQuadraticSolverMainDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

./ToolQuadraticSolver/qtquadraticsolvermenudialog.h

 

#ifndef QTQUADRATICSOLVERMENUDIALOG_H
#define QTQUADRATICSOLVERMENUDIALOG_H

#include "qthideandshowdialog.h"

namespace Ui {
  class QtQuadraticSolverMenuDialog;
}

namespace ribi {

class QtQuadraticSolverMenuDialog : public QtHideAndShowDialog
{
  Q_OBJECT

public:
  explicit QtQuadraticSolverMenuDialog(QWidget *parent = 0);
  QtQuadraticSolverMenuDialog(const QtQuadraticSolverMenuDialog&) = delete;
  QtQuadraticSolverMenuDialog& operator=(const QtQuadraticSolverMenuDialog&) = delete;
  ~QtQuadraticSolverMenuDialog() noexcept;

protected:

  void keyPressEvent(QKeyEvent *);

private:
  Ui::QtQuadraticSolverMenuDialog *ui;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif

private slots:
  void on_button_about_clicked();
  void on_button_quit_clicked();
  void on_button_start_clicked();
};

} //~namespace ribi

#endif // QTQUADRATICSOLVERMENUDIALOG_H

 

 

 

 

 

./ToolQuadraticSolver/qtquadraticsolvermenudialog.cpp

 

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#include "qtquadraticsolvermenudialog.h"

#include <QDesktopWidget>
#include <QKeyEvent>

#include "quadraticsolvermenudialog.h"
#include "qtaboutdialog.h"
#include "qtquadraticsolvermaindialog.h"
#include "qthideandshowdialog.h"
#include "testtimer.h"
#include "trace.h"
#include "ui_qtquadraticsolvermenudialog.h"
#pragma GCC diagnostic pop

ribi::QtQuadraticSolverMenuDialog::QtQuadraticSolverMenuDialog(QWidget *parent) :
    QtHideAndShowDialog(parent),
    ui(new Ui::QtQuadraticSolverMenuDialog)
{
  #ifndef NDEBUG
  Test();
  #endif
  ui->setupUi(this);
}

ribi::QtQuadraticSolverMenuDialog::~QtQuadraticSolverMenuDialog() noexcept
{
  delete ui;
}

void ribi::QtQuadraticSolverMenuDialog::keyPressEvent(QKeyEvent * event)
{
  if (event->key() == Qt::Key_Escape) { close(); return; }
}

void ribi::QtQuadraticSolverMenuDialog::on_button_about_clicked()
{
  About a = QuadraticSolverMenuDialog().GetAbout();
  a.AddLibrary("QtHideAndShowDialog version: " + QtHideAndShowDialog::GetVersion());
  QtAboutDialog d(a);
  d.setWindowIcon(this->windowIcon());
  d.setStyleSheet(this->styleSheet());
  this->ShowChild(&d);
}

void ribi::QtQuadraticSolverMenuDialog::on_button_quit_clicked()
{
  close();
}

void ribi::QtQuadraticSolverMenuDialog::on_button_start_clicked()
{
  QtQuadraticSolverMainDialog d;
  //d.setStyleSheet(this->styleSheet());
  ShowChild(&d);
}

#ifndef NDEBUG
void ribi::QtQuadraticSolverMenuDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

./ToolQuadraticSolver/quadraticsolvermaindialog.h

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, solver of quadratic equations
Copyright (C) 2008-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
// From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#ifndef QUADRATICSOLVERMAINDIALOG_H
#define QUADRATICSOLVERMAINDIALOG_H

#include <string>
#include <vector>

namespace ribi {

struct QuadraticSolverMainDialog
{
  QuadraticSolverMainDialog();

  void Execute() const noexcept;

  ///Calculates all solutions from the quadratic equation,
  ///y = a.x.x + b.x + c
  ///From http://www.richelbilderbeek.nl/CppSolveQuadratic.htm
  static const std::vector<double> SolveQuadratic(
    const double a, const double b, const double c);

  private:
  //From http://www.richelbilderbeek.nl/CppAskUserForString.htm
  static std::string AskUserForString() noexcept;

  //From http://www.richelbilderbeek.nl/CppAskUserForDouble.htm
  static double AskUserForDouble() noexcept;

  //From http://www.richelbilderbeek.nl/CppIsDouble.htm
  static bool IsDouble(const std::string& s) noexcept;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // QUADRATICSOLVERMAINDIALOG_H

 

 

 

 

 

./ToolQuadraticSolver/quadraticsolvermaindialog.cpp

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, solver of quadratic equations
Copyright (C) 2008-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
// From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#include "quadraticsolvermaindialog.h"

#include <cmath>
#include <iostream>
#include <iterator>
#include <sstream>

#include <boost/lexical_cast.hpp>

#include "trace.h"
#include "testtimer.h"
#pragma GCC diagnostic pop

ribi::QuadraticSolverMainDialog::QuadraticSolverMainDialog()
{
  #ifndef NDEBUG
  Test();
  #endif
}

std::string ribi::QuadraticSolverMainDialog::AskUserForString() noexcept
{
  std::string s;
  std::getline(std::cin,s);
  return s;
}

double ribi::QuadraticSolverMainDialog::AskUserForDouble() noexcept
{
  while (1)
  {
    const std::string s = AskUserForString();
    if (IsDouble(s)==false) continue;
    return boost::lexical_cast<double>(s);
  }
}

void ribi::QuadraticSolverMainDialog::Execute() const noexcept
{
  while (1)
  {
    std::cout << "Please enter a value for a" << std::endl;
    const double a = AskUserForDouble();
    std::cout << "Please enter a value for b" << std::endl;
    const double b = AskUserForDouble();
    std::cout << "Please enter a value for c" << std::endl;
    const double c = AskUserForDouble();
    std::cout << "Solutions of this quadratic equations are:" << std::endl;
    const std::vector<double> v = ribi::QuadraticSolverMainDialog::SolveQuadratic(a,b,c);
    std::copy(v.begin(),v.end(),std::ostream_iterator<double>(std::cout," "));
    if (v.empty()==true)
      std::cout << "None..." << std::endl;
    else
      std::cout << std::endl;
    std::cout << "Type 'q' to quit, anything else to continue." << std::endl;
    const std::string quit = AskUserForString();
    if (quit == "q" || quit == "Q") break;
  }
}

bool ribi::QuadraticSolverMainDialog::IsDouble(const std::string& s) noexcept
{
  std::istringstream i(s);
  double temp;
  return ( (i >> temp) ? true : false );
}

const std::vector<double> ribi::QuadraticSolverMainDialog::SolveQuadratic(
  const double a, const double b, const double c)
{
  if (a == 0.0)
  {
    if (b == 0.0)
      return std::vector<double>(1,0.0);
    else
      return std::vector<double>(1,c/b);
  }
  const double d = (b * b) - (4.0 * a * c);
  if (d < 0.0)
    return std::vector<double>();
  if (d == 0.0)
    return std::vector<double>(1,-b/(2.0*a));
  const double rD = std::sqrt(d);
  std::vector<double> solutions;
  solutions.reserve(2);
  solutions.push_back((-b + rD)/(2.0 * a));
  solutions.push_back((-b - rD)/(2.0 * a));
  return solutions;
}

#ifndef NDEBUG
void ribi::QuadraticSolverMainDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

./ToolQuadraticSolver/quadraticsolvermenudialog.h

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, solver of quadratic equations
Copyright (C) 2008-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
// From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#ifndef QUADRATICSOLVERMENUDIALOG_H
#define QUADRATICSOLVERMENUDIALOG_H

#include "menudialog.h"

namespace ribi {

///GUI independent QuadraticSolver menu dialog
struct QuadraticSolverMenuDialog final : public MenuDialog
{
  About GetAbout() const noexcept override;
  Help GetHelp() const noexcept override;
  boost::shared_ptr<const Program> GetProgram() const noexcept override;
  std::string GetVersion() const noexcept override;
  std::vector<std::string> GetVersionHistory() const noexcept override;

  private:
  int ExecuteSpecific(const std::vector<std::string>& argv) noexcept override;

  #ifndef NDEBUG
  static void Test() noexcept;
  #endif
};

} //~namespace ribi

#endif // QUADRATICSOLVERMENUDIALOG_H

 

 

 

 

 

./ToolQuadraticSolver/quadraticsolvermenudialog.cpp

 

//---------------------------------------------------------------------------
/*
QuadraticSolver, solver of quadratic equations
Copyright (C) 2008-2015 Richel Bilderbeek

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//---------------------------------------------------------------------------
// From http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm
//---------------------------------------------------------------------------
#include "quadraticsolvermenudialog.h"

#include "quadraticsolvermaindialog.h"
#include "richelbilderbeekprogram.h"
#include "testtimer.h"
#include "trace.h"

int ribi::QuadraticSolverMenuDialog::ExecuteSpecific(const std::vector<std::string>& argv) noexcept
{
  #ifndef NDEBUG
  Test();
  #endif
  const int argc = static_cast<int>(argv.size());
  if (argc == 1)
  {
    QuadraticSolverMainDialog d;
    d.Execute();
    return 0;
  }
  assert(!"TODO");
  return 1;
}

ribi::About ribi::QuadraticSolverMenuDialog::GetAbout() const noexcept
{
  About a(
    "Richel Bilderbeek",
    "QuadraticSolver",
    "solver of quadratic equations",
    "the 2nd of January 2015",
    "2008-2015",
    "http://www.richelbilderbeek.nl/ToolQuadraticSolver.htm",
    GetVersion(),
    GetVersionHistory()
  );
  a.AddLibrary("TestTimer version: " + TestTimer::GetVersion());
  a.AddLibrary("Trace version: " + Trace::GetVersion());
  return a;
}

ribi::Help ribi::QuadraticSolverMenuDialog::GetHelp() const noexcept
{
  return Help(
    this->GetAbout().GetFileTitle(),
    this->GetAbout().GetFileDescription(),
    {

    },
    {

    }
  );
}

boost::shared_ptr<const ribi::Program> ribi::QuadraticSolverMenuDialog::GetProgram() const noexcept
{
  const boost::shared_ptr<const Program> p {
    new ProgramQuadraticSolver
  };
  assert(p);
  return p;
}

std::string ribi::QuadraticSolverMenuDialog::GetVersion() const noexcept
{
  return "2.2";
}

std::vector<std::string> ribi::QuadraticSolverMenuDialog::GetVersionHistory() const noexcept
{
  return {
    "2008-xx-xx: version 1.0: initial version in C++ Builder",
    "2013-08-26: version 2.0: port to Qt Creator, console version",
    "2013-10-01: version 2.1: added desktop version",
    "2015-01-02: version 2.2: added picture of equation to desktop version"
  };
}

#ifndef NDEBUG
void ribi::QuadraticSolverMenuDialog::Test() noexcept
{
  {
    static bool is_tested{false};
    if (is_tested) return;
    is_tested = true;
  }
  const TestTimer test_timer(__func__,__FILE__,1.0);
}
#endif

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml