W3cubDocs

/Kotlin

average

@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.

@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.

© 2010–2018 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/average.html