|
Updraft
1.0
Open source glider flight visualisation tool.
|
Class representing a linear function. More...
#include <linearfunc.h>
Public Member Functions | |
| LinearFunc () | |
| LinearFunc (qreal slope, qreal yIntercept) | |
| LinearFunc (qreal x0, qreal y0, qreal x1, qreal y1) | |
| Set the linear function to have value y0 in x0 and y1 in x1. | |
| void | set (qreal slope, qreal yIntercept) |
| void | set (qreal x0, qreal y0, qreal x1, qreal y1) |
| Set the linear function to have value y0 in x0 and y1 in x1. | |
| LinearFunc | compose (const LinearFunc &other) const |
| Return a composed linear function corresponding to this->get(other->get(x)) | |
| qreal | get (qreal x) const |
| Return the value of function in x. | |
| qreal | inverse (qreal y) const |
| Return the value of x when the function has the value y. | |
Protected Attributes | |
| qreal | a |
| qreal | b |
Class representing a linear function.
Just a convenience to avoid keeping two qreals all the time.
| Updraft::Util::LinearFunc::LinearFunc | ( | ) | [inline] |
| Updraft::Util::LinearFunc::LinearFunc | ( | qreal | slope, |
| qreal | yIntercept | ||
| ) | [inline] |
| Updraft::Util::LinearFunc::LinearFunc | ( | qreal | x0, |
| qreal | y0, | ||
| qreal | x1, | ||
| qreal | y1 | ||
| ) | [inline] |
Set the linear function to have value y0 in x0 and y1 in x1.
| LinearFunc Updraft::Util::LinearFunc::compose | ( | const LinearFunc & | other | ) | const [inline] |
Return a composed linear function corresponding to this->get(other->get(x))
| qreal Updraft::Util::LinearFunc::get | ( | qreal | x | ) | const [inline] |
Return the value of function in x.
| qreal Updraft::Util::LinearFunc::inverse | ( | qreal | y | ) | const [inline] |
Return the value of x when the function has the value y.
| void Updraft::Util::LinearFunc::set | ( | qreal | slope, |
| qreal | yIntercept | ||
| ) | [inline] |
| void Updraft::Util::LinearFunc::set | ( | qreal | x0, |
| qreal | y0, | ||
| qreal | x1, | ||
| qreal | y1 | ||
| ) | [inline] |
Set the linear function to have value y0 in x0 and y1 in x1.
qreal Updraft::Util::LinearFunc::a [protected] |
qreal Updraft::Util::LinearFunc::b [protected] |