Closest-pair problem/C: Difference between revisions
Content added Content deleted
(replaced code) |
mNo edit summary |
||
Line 21: | Line 21: | ||
int cmp_x(const void *a, const void *b) { |
int cmp_x(const void *a, const void *b) { |
||
return cmp_dbl( (*( |
return cmp_dbl( (*(const point*)a)->x, (*(const point*)b)->x ); |
||
} |
} |
||
int cmp_y(const void *a, const void *b) { |
int cmp_y(const void *a, const void *b) { |
||
return cmp_dbl( (*( |
return cmp_dbl( (*(const point*)a)->y, (*(const point*)b)->y ); |
||
} |
} |
||