average

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

Returns an average value of elements in the array.

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

Returns an average value of elements in the collection.