Hullaballoonatic
09/18/2018, 12:14 AMhudsonb
09/18/2018, 12:35 AMHullaballoonatic
09/18/2018, 12:39 AMfun Pair<Int,Int>.distanceTo(to: Pair<Int,Int>): Float = sqrt((this.first - to.first).toDouble().pow(2.0) + (this.second - to.second).toDouble().pow(2.0)).toFloat()
hudsonb
09/18/2018, 1:23 AMpow
extension function to Int
right and avoid all the conversion calls? Or are ya looking for a lib that has already defined many extensions like that on numeric types?