Ah, I love math like that. Google of course can give you the formula, but it’s fun to derive it.
Two points on the line
The point to get the distance of
Dist = ((x0-x1)*(py-y1)-(y0-y1)*(px-x1))/distance(x0,y0,x1,y1)
Anyways that’ll give you the signed distance. It will be negative on one side of the line. Use abs() to make it positive.