This site requires javascript.
Android Code Search
file:androidx/compose/material/Swipeable.kt function:computeThreshold
search
close
info_outline
more_vert
Result 1 of 1
content_copy
Search Result Root
androidx/platform/frameworks/support
keyboard_arrow_right
Branch
Branch
androidx-main
keyboard_arrow_right
Search Result Path
compose/material/material/src/commonMain/kotlin/androidx/compose/material/
Swipeable.kt
content_copy
Preview
625:
626:
627:
/** Compute the value of the threshold (in pixels), once the values of the anchors are known. */
fun
Density.
computeThreshold
(fromValue: Float, toValue: Float): Float
}
637:
638:
639:
data
class
FixedThreshold(
private
val
offset: Dp) : ThresholdConfig {
override
fun
Density.
computeThreshold
(fromValue: Float, toValue: Float): Float {
return
fromValue + offset.toPx() * sign(toValue - fromValue)
654:
655:
656:
) : ThresholdConfig {
override
fun
Density.
computeThreshold
(fromValue: Float, toValue: Float): Float {
return
lerp(fromValue, toValue, fraction)
chevron_left
1
chevron_right
Results per page
10
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Got it
Help
Open branch androidx-main