KT-6159: rename duplicates met

This commit is contained in:
Mikhail Glukhikh
2017-03-21 18:42:06 +03:00
parent 342118dfa8
commit 77888349cd
4 changed files with 37 additions and 14 deletions
@@ -1,8 +1,8 @@
class Point(val x: Double, val y: Double) {
// After sqr inlining, only first usage of sqr is replaced
fun distance(other: Point): Double {
val x = x - other.x
val x1 = x - other.x
// See KT-17022
return Math.sqrt(x * x + sqr(y - other.y))
return Math.sqrt(x1 * x1 + sqr(y - other.y))
}
}