Завершил подключение встроенного qsort
This commit is contained in:
parent
a45af76154
commit
6e9934a2d8
5 changed files with 12 additions and 14 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -141,12 +141,12 @@ bool more(double a, double b) {
|
|||
}
|
||||
|
||||
int compare(const void * ufirst, const void * usecond) {
|
||||
double first = (double)ufirst;
|
||||
double second = (double)usecond;
|
||||
double first = *(double *)ufirst;
|
||||
double second = *(double *)usecond;
|
||||
|
||||
if ((first - second) > eps) {
|
||||
if ((first - second) > exp) {
|
||||
return 1;
|
||||
} else ((second - first) > eps) {
|
||||
} else if ((second - first) > exp) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue