# FractionalThreshold

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


```
@ExperimentalWearMaterialApi
data class FractionalThreshold : ThresholdConfig
```

<br />

*** ** * ** ***

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

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material/FractionalThreshold#FractionalThreshold(kotlin.Float)(fraction: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` |

| ### 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.https://developer.android.com/reference/kotlin/androidx/wear/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)` Compute the value of the threshold (in pixels), once the values of the anchors are known. |

## Public constructors

### FractionalThreshold

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

```
FractionalThreshold(fraction: @FloatRange(from = 0.0, to = 1.0) Float)
```

| Parameters |
|---|---|
| `fraction: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 1.0) 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

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

```
open fun Density.computeThreshold(fromValue: Float, toValue: Float): Float
```

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