#include <stdio.h>

#include "radar.h"

int main(){
    // compute_distance
    struct point p1 = { 0.0, 0.0 };
    struct point p2 = { 3.0, 4.0 };

    double dist = compute_distance(p1, p2);
    printf("Distance: %.2f\n", dist);

    // is_in_area
    struct point center = { 5.0, 5.0 };
    double radius = 3.0;

    struct point inside_point = { 7.0, 7.0 };
    struct point outside_point = { 9.0, 9.0 };

    int inside = is_in_area(center, radius, inside_point);
    int outside = is_in_area(center, radius, outside_point);

    printf("Inside: %d\n", inside);
    printf("Outside: %d\n", outside);

    // detect_points
    center.x = 10.0;
    center.y = 10.0;
    double range = 5.0;

    struct point points[] = {
        { 11.0, 11.0 },
        { 10.0, 10.0 },
        { 20.0, 20.0 },
        { 14.0, 13.0 }
    };

    size_t size = sizeof(points) / sizeof(struct point);

    size_t found = detect_points(center, range, points, size);
    printf("Total found: %zu\n", found);

}
