check_dist_sign function

Check if valid signed distance