Nesta página

Utils::MathUtils Namespace

namespace Utils::MathUtils

Contém funções para interpolação. Mais...

Header: #include <MathUtils>

Funções

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)

Descrição detalhada

Documentação das funções

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

Interpolação exponencial:

  • Para x = 0, ela retorna y1.
  • Para x = xHalfLife, retorna 50 % da distância entre y1 e y2.
  • Para x = infinito, retorna y2.

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

Interpolação linear:

  • Para x = x1, ela retorna y1.
  • Para x = x2, retorna y2.

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

Interpolação tangencial:

  • Para x = 0, ela retorna y1.
  • Para x = xHalfLife, retorna 50% da distância entre y1 e y2.
  • Para x = infinito, retorna 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.