Sur cette page

Utils::MathUtils Namespace

namespace Utils::MathUtils

Contient des fonctions d'interpolation. En savoir plus...

Header: #include <MathUtils>

Fonctions

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)

Description détaillée

Documentation des fonctions

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

Interpolation exponentielle :

  • Pour x = 0, elle renvoie y1.
  • Pour x = xHalfLife, elle renvoie 50 % de la distance entre y1 et y2.
  • Lorsque x = l'infini, la fonction renvoie y2.

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

Interpolation linéaire :

  • Pour x = x1, elle renvoie y1.
  • Pour x = x2, elle renvoie y2.

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

Interpolation tangentielle :

  • Pour x = 0, elle renvoie y1.
  • Pour x = xHalfLife, elle renvoie 50 % de la distance entre y1 et y2.
  • Lorsque x = l'infini, la fonction renvoie 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.