- Extending Qt Creator Manual
- MathUtils Namespace
- Extending Qt Creator Manual 10.0.2

# MathUtils Namespace

Utils::MathUtils

## Functions

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)

## Function Documentation

### int 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.

### int 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.

### int 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.