Utils::MathUtils Namespace
namespace Utils::MathUtilsМістить функції для інтерполяції. Детальніше...
| Header: | #include <MathUtils> |
Функції
| int | interpolateExponential(int x, int xHalfLife, int y1, int y2) |
| int | interpolateLinear(int x, int x1, int x2, int y1, int y2) |
| int | interpolateTangential(int x, int xHalfLife, int y1, int y2) |
Документація до функцій
int MathUtils::interpolateExponential(int x, int xHalfLife, int y1, int y2)
Експоненціальна інтерполяція:
- Для x = 0 вона повертає y1.
- Для x = xHalfLife функція повертає 50 % відстані між y1 та y2.
- Якщо x = нескінченність, функція повертає y2.
int MathUtils::interpolateLinear(int x, int x1, int x2, int y1, int y2)
Лінійна інтерполяція:
- Для x = x1 повертається y1.
- Для x = x2 повертається y2.
int MathUtils::interpolateTangential(int x, int xHalfLife, int y1, int y2)
Тангенціальна інтерполяція:
- Для x = 0 вона повертає y1.
- Для x = xHalfLife функція повертає 50 % відстані між y1 та y2.
- Якщо x = нескінченність, то функція повертає y2.
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.