I was tinkering around with my IDE and I stumbled across something interesting. Check out this code:
val arr1 = intArrayOf(3, 3, 2)
val set1 = setOf(3, 3, 2)
println(arr1.average())
println(set1.average())
These appear pretty similar, but it returns this:
2.6666666666666665
2.5
Why are these returning different values?