average

Common
JVM
JS
Native
1.0
@JvmName("averageOfByte") fun Array<out Byte>.average(): Double
(source)
@JvmName("averageOfShort") fun Array<out Short>.average(): Double
(source)
@JvmName("averageOfInt") fun Array<out Int>.average(): Double
(source)
@JvmName("averageOfLong") fun Array<out Long>.average(): Double
(source)
@JvmName("averageOfFloat") fun Array<out Float>.average(): Double
(source)
@JvmName("averageOfDouble") fun Array<out Double>.average(): Double
(source)
fun ByteArray.average(): Double
(source)
fun ShortArray.average(): Double
(source)
fun IntArray.average(): Double
(source)
fun LongArray.average(): Double
(source)
fun FloatArray.average(): Double
(source)
fun DoubleArray.average(): Double
(source)

Returns an average value of elements in the array.

Common
JVM
JS
Native
1.0
@JvmName("averageOfByte") fun Iterable<Byte>.average(): Double
(source)
@JvmName("averageOfShort") fun Iterable<Short>.average(): Double
(source)
@JvmName("averageOfInt") fun Iterable<Int>.average(): Double
(source)
@JvmName("averageOfLong") fun Iterable<Long>.average(): Double
(source)
@JvmName("averageOfFloat") fun Iterable<Float>.average(): Double
(source)
@JvmName("averageOfDouble") fun Iterable<Double>.average(): Double
(source)

Returns an average value of elements in the collection.