diff --git a/include/VOSS/utils/Point.hpp b/include/VOSS/utils/Point.hpp index 324bf3a..14cf8bd 100644 --- a/include/VOSS/utils/Point.hpp +++ b/include/VOSS/utils/Point.hpp @@ -1,10 +1,17 @@ #pragma once +#include namespace voss { struct Point { double x; double y; + + static double getDistance(Point a, Point b) { + double dx = a.x - b.x; + double dy = a.y - b.y; + return sqrt(dx * dx + dy * dy); + } }; } // namespace voss \ No newline at end of file