]> git.lizzy.rs Git - bspwm.git/blobdiff - helpers.c
Refresh TODO list
[bspwm.git] / helpers.c
index 28bed8e500a4382fd96654daaf5115097651808b..45e3e6a11c8c4cea4ae22d2187720d9c243d3882 100644 (file)
--- a/helpers.c
+++ b/helpers.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
+#include <math.h>
 #include <xcb/xcb.h>
 #include <xcb/xcb_event.h>
 #include "bspwm.h"
@@ -51,3 +52,8 @@ uint32_t get_color(char *col)
 
     return pxl;
 }
+
+double distance(xcb_point_t a, xcb_point_t b)
+{
+    return hypot(a.x - b.x, a.y - b.y);
+}