Utils::MathUtils Namespace

namespace Utils::MathUtils

Contains functions for interpolation. More...

Header: #include <MathUtils>

Functions

class Utils::Q_DECL_IMPORT interpolateExponential(int x, int xHalfLife, int y1, int y2)
class Utils::Q_DECL_IMPORT interpolateLinear(int x, int x1, int x2, int y1, int y2)
class Utils::Q_DECL_IMPORT interpolateTangential(int x, int xHalfLife, int y1, int y2)

Detailed Description

Function Documentation

class Utils::Q_DECL_IMPORT MathUtils::interpolateExponential(int x, int xHalfLife, int y1, int y2)

Exponential interpolation:

  • For x = 0 it returns y1.
  • For x = xHalfLife it returns 50 % of the distance between y1 and y2.
  • For x = infinity it returns y2.

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

Linear interpolation:

  • For x = x1 it returns y1.
  • For x = x2 it returns y2.

class Utils::Q_DECL_IMPORT MathUtils::interpolateTangential(int x, int xHalfLife, int y1, int y2)

Tangential interpolation:

  • For x = 0 it returns y1.
  • For x = xHalfLife it returns 50 % of the distance between y1 and y2.
  • For x = infinity it returns y2.