5
answers
0
watching
534
views
14 Jan 2018
25. Fill in the blank so that this function returns true if the circle at xl, yl with radius rl, has collided with the circle at x2, y2, with radius r2. boolean collided (int xl, int yl, int ri, int x2, int y2, int r2) { return A. B. dist(xl, yl, x2, y2) <= rl+r2 abs(x1-x2) >= rl+r2 && abs(yl-y2) <= rl+r2 A and B will both work Neither A nor B work but one would be correct if the <= was > Neither A nor B work but both would be correct if the <= was >=
25. Fill in the blank so that this function returns true if the circle at xl, yl with radius rl, has collided with the circle at x2, y2, with radius r2. boolean collided (int xl, int yl, int ri, int x2, int y2, int r2) { return A. B. dist(xl, yl, x2, y2) <= rl+r2 abs(x1-x2) >= rl+r2 && abs(yl-y2) <= rl+r2 A and B will both work Neither A nor B work but one would be correct if the <= was > Neither A nor B work but both would be correct if the <= was >=
abhisheksinghLv10
3 Oct 2023
22 Jun 2023
Already have an account? Log in
gloryolalere280Lv10
20 Nov 2022
Already have an account? Log in
Hubert KochLv2
15 Jan 2018
Already have an account? Log in