# FractionalThreshold

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Swipeable.kt+class:androidx.compose.material.FractionalThreshold) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalMaterialApi
  data class FractionalThreshold : ThresholdConfig
  ```

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

A fractional threshold will be at a `https://developer.android.com/reference/kotlin/androidx/compose/material/FractionalThreshold#(kotlin.Float)` of the way between the two anchors.

## Summary

| ### Public constructors |
|---|---|
| `[FractionalThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FractionalThreshold#FractionalThreshold(kotlin.Float))(fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density.[computeThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FractionalThreshold#(androidx.compose.ui.unit.Density).computeThreshold(kotlin.Float,kotlin.Float))(fromValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, toValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

## Public constructors

### FractionalThreshold

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
[FractionalThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FractionalThreshold#FractionalThreshold(kotlin.Float))(fraction: Float)
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

| Parameters |
|---|---|
| `fraction: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The fraction (between 0 and 1) that the threshold will be at. |

## Public functions

### Density.computeThreshold

Cmn Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Swipeable.kt+function:computeThreshold)

```
open fun Density.[computeThreshold](https://developer.android.com/reference/kotlin/androidx/compose/material/FractionalThreshold#(androidx.compose.ui.unit.Density).computeThreshold(kotlin.Float,kotlin.Float))(fromValue: Float, toValue: Float): Float
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Compute the value of the threshold (in pixels), once the values of the anchors are known.