Na tej strani

Utils::MathUtils Namespace

namespace Utils::MathUtils

Vsebuje funkcije za interpolacijo. Več...

Header: #include <MathUtils>

Funkcije

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)

Podroben opis

Dokumentacija funkcij

int MathUtils::interpolateExponential(int x, int xHalfLife, int y1, int y2)

Eksponentna interpolacija:

  • Za x = 0 vrne y1.
  • Za x = xHalfLife vrne 50 % razdalje med y1 in y2.
  • Če je x enako neskončnosti, vrne y2.

int MathUtils::interpolateLinear(int x, int x1, int x2, int y1, int y2)

Linearna interpolacija:

  • Za x = x1 vrne y1.
  • Za x = x2 vrne y2.

int MathUtils::interpolateTangential(int x, int xHalfLife, int y1, int y2)

Tangencialna interpolacija:

  • Za x = 0 vrne y1.
  • Za x = xHalfLife vrne 50 % razdalje med y1 in y2.
  • Če je x enako neskončnosti, vrne 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.