Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

androidx.compose.ui.util

Top-level functions summary

Float
lerp(start: Float, stop: Float, fraction: Float)

Linearly interpolate between start and stop with fraction fraction between them.

Int
lerp(start: Int, stop: Int, fraction: Float)

Linearly interpolate between start and stop with fraction fraction between them.

Long
lerp(start: Long, stop: Long, fraction: Float)

Linearly interpolate between start and stop with fraction fraction between them.

Long
packFloats(val1: Float, val2: Float)

Packs two Float values into one Long value for use in inline classes.

Long
packInts(val1: Int, val2: Int)

Packs two Int values into one Long value for use in inline classes.

T
trace(sectionName: String, block: () -> T)

Wrap the specified block in calls to Trace.beginSection (with the supplied sectionName) and Trace.endSection.

Float

Unpacks the first Float value in packFloats from its returned Long.

Float

Unpacks the second Float value in packFloats from its returned Long.

Int
unpackInt1(value: Long)

Unpacks the first Int value in packInts from its returned ULong.

Int
unpackInt2(value: Long)

Unpacks the second Int value in packInts from its returned ULong.

Extension functions summary

For kotlin.collections.List
Boolean
List<T>.fastAll(predicate: (T) -> Boolean)

Returns true if all elements match the given predicate.

Boolean
List<T>.fastAny(predicate: (T) -> Boolean)

Returns true if at least one element matches the given predicate.

T?
List<T>.fastFirstOrNull(predicate: (T) -> Boolean)

Returns the first value that predicate returns true for or null if nothing matches.

Unit
List<T>.fastForEach(action: (T) -> Unit)

Iterates through a List using the index and calls action for each item.

Unit
List<T>.fastForEachIndexed(action: (Int, T) -> Unit)

Iterates through a List using the index and calls action for each item.

List<R>
List<T>.fastMap(transform: (T) -> R)

Returns a list containing the results of applying the given transform function to each element in the original collection.

C
List<T>.fastMapTo(destination: C, transform: (T) -> R)

Applies the given transform function to each element of the original collection and appends the results to the given destination.

T?
List<T>.fastMaxBy(selector: