SBDP01/record.c
2018-10-21 13:04:41 +02:00

13 lines
234 B
C

#include "record.h"
#include <math.h>
double record_length(const record_t a)
{
return sqrt(a.x * a.x + a.y * a.y);
}
double record_compare(const record_t a, const record_t b)
{
return record_length(a) - record_length(b);
}