static double distanceLineFromOrigin(Line line) { // https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line return line.intercept.abs() / math.sqrt(math.pow(line.slope, 2) + 1); }