Skip to content

Commit 7a32337

Browse files
committed
Fixed sonar
1 parent f99a87a commit 7a32337

File tree

1 file changed

+3
-1
lines changed
  • src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable

1 file changed

+3
-1
lines changed

src/main/java/g3201_3300/s3235_check_if_the_rectangle_corner_is_reachable/Solution.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ public boolean canReachCorner(int x, int y, int[][] circles) {
5959
int x2 = circles[j][0];
6060
int y2 = circles[j][1];
6161
int r2 = circles[j][2];
62-
double dist = Math.sqrt(Math.pow(x1 - x2, 2.0) + Math.pow(y1 - y2, 2.0));
62+
double dist =
63+
Math.sqrt(
64+
Math.pow(x1 - (double) x2, 2.0) + Math.pow(y1 - (double) y2, 2.0));
6365
if (dist <= (r1 + r2)) {
6466
ds.dsu(i, j);
6567
}

0 commit comments

Comments
 (0)