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
X0,y0
X1,y1
The point to get the distance of
Px,py
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.