Eclipse SUMO - Simulation of Urban MObility
|
Utility functions for solving quadratic and cubic equations in real domain. More...
#include <PolySolver.h>
Static Public Member Functions | |
static std::tuple< int, double, double, double > | cubicSolve (double a, double b, double c, double d) |
Solver of cubic equation ax^3 + bx^2 + cx + d = 0. | |
static std::tuple< int, double, double > | quadraticSolve (double a, double b, double c) |
Solver of quadratic equation ax^2 + bx + c = 0. | |
Utility functions for solving quadratic and cubic equations in real domain.
Definition at line 32 of file PolySolver.h.
|
static |
Solver of cubic equation ax^3 + bx^2 + cx + d = 0.
Returns only real-valued roots.
[in] | a | The coefficient of the cubic term x^3 |
[in] | b | The coefficient of the quadratic term x^2 |
[in] | c | The coefficient of the linear term x |
[in] | d | The coefficient of the constant term |
Definition at line 74 of file PolySolver.cpp.
References M_PI, and quadraticSolve().
Referenced by HelpersEnergy::acceleration().
|
static |
Solver of quadratic equation ax^2 + bx + c = 0.
Returns only real-valued roots.
[in] | a | The coefficient of the quadratic term x^2 |
[in] | b | The coefficient of the linear term x |
[in] | c | The coefficient of the constant term |
Definition at line 34 of file PolySolver.cpp.
Referenced by cubicSolve().