This site requires javascript.
Android Code Search
file:androidx/compose/ui/util/MathHelpers.kt function:fastCoerceAtMost
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/ui/ui-util/src/commonMain/kotlin/androidx/compose/ui/util/
MathHelpers.kt
content_copy
Preview
72:
73:
74:
/** Ensures that this value is not greater than the specified [maximumValue]. */
inline
fun
Float.
fastCoerceAtMost
(maximumValue: Float): Float {
return
if
(this > maximumValue) maximumValue
else
this
90:
91:
92:
/** Ensures that this value is not greater than the specified [maximumValue]. */
inline
fun
Double.
fastCoerceAtMost
(maximumValue: Double): Double {
return
if
(this > maximumValue) maximumValue
else
this
108:
109:
110:
/** Ensures that this value is not greater than the specified [maximumValue]. */
inline
fun
Int.
fastCoerceAtMost
(maximumValue: Int): Int {
return
if
(this > maximumValue) maximumValue
else
this
126:
127:
128:
/** Ensures that this value is not greater than the specified [maximumValue]. */
inline
fun
Long.
fastCoerceAtMost
(maximumValue: Long): Long {
return
if
(this > maximumValue) maximumValue
else
this
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