Skip to content

Commit

Permalink
c darts iteration #3
Browse files Browse the repository at this point in the history
Use hypotf.
  • Loading branch information
gabriel376 committed Jul 4, 2021
1 parent ab93d34 commit 0d5d395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c/darts/src/darts.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define OUTER_SCORE 1

int score(coordinate_t coord) {
float position = hypot(coord.x, coord.y);
float position = hypotf(coord.x, coord.y);

if (position <= INNER_RADIUS) return INNER_SCORE;
if (position <= MIDDLE_RADIUS) return MIDDLE_SCORE;
Expand Down

0 comments on commit 0d5d395

Please sign in to comment.