# LinearCurveFit

Artifact: [androidx.constraintlayout:constraintlayout-core](https://developer.android.com/jetpack/androidx/releases/constraintlayout) [View Source](https://cs.android.com/search?q=file:androidx/constraintlayout/core/motion/utils/LinearCurveFit.java+class:androidx.constraintlayout.core.motion.utils.LinearCurveFit) Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

*** ** * ** ***

<br />

```
class LinearCurveFit : CurveFit
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.constraintlayout.core.motion.utils.CurveFit](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit) ||
|   | ↳ | [androidx.constraintlayout.core.motion.utils.LinearCurveFit](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit) |

*** ** * ** ***

This performs a simple linear interpolation in multiple dimensions

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#LinearCurveFit(double[],double[][])(time: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!>!)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getPos(double,int)(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, j: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getPos(double,double[])(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getPos(double,float[])(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getSlope(double,int)(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, j: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getSlope(double,double[])(t: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html, v: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!` | `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/LinearCurveFit#getTimePoints()()` |

### Inherited Constants

From [androidx.constraintlayout.core.motion.utils.CurveFit](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit) `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit#CONSTANT() = 2` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit#LINEAR() = 1` `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit#SPLINE() = 0`

### Inherited functions

From [androidx.constraintlayout.core.motion.utils.CurveFit](https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit) `java-static https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit#get(int,double[],double[][])(type: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, time: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!>!)` `java-static https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit!` `https://developer.android.com/reference/kotlin/androidx/constraintlayout/core/motion/utils/CurveFit#getArc(int[],double[],double[][])(

arcModes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!,

time: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!,

y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html>!>!

)`

## Public constructors

### LinearCurveFit

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
LinearCurveFit(time: DoubleArray<Double>!, y: Array<DoubleArray<Double>!>!)
```

## Public functions

### getPos

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getPos(t: Double, j: Int): Double
```

### getPos

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getPos(t: Double, v: DoubleArray<Double>!): Unit
```

### getPos

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getPos(t: Double, v: FloatArray<Float>!): Unit
```

### getSlope

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getSlope(t: Double, j: Int): Double
```

### getSlope

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getSlope(t: Double, v: DoubleArray<Double>!): Unit
```

### getTimePoints

Added in [1.1.2](https://developer.android.com/jetpack/androidx/releases/constraintlayout#1.1.2)

```
fun getTimePoints(): Array<Double>!
```