def point_to_t(self, point):
def in_range(min, max, val):<EOL><INDENT>return (min <= val) and (max >= val)<EOL><DEDENT>if np.isclose(point, self.start, rtol=<NUM_LIT:0.0>, atol=<NUM_LIT>):<EOL><INDENT>return <NUM_LIT:0.0><EOL><DEDENT>elif np.isclose(point, self.end, rtol=<NUM_LIT:0.0>, atol=<NUM_LIT>):<EOL><INDENT>return <NUM_LIT:1.0><EOL><DEDENT>if self.rotation != <NUM_LIT:0.0>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>v = point - self.center<EOL>distance_from_center = sqrt((v.real * v.real) + (v.imag * v.imag))<EOL>min_radius = min(self.radius.real, self.radius.imag)<EOL>max_radius = max(self.radius.real, self.radius.imag)<EOL>if (distance_from_center < min_radius) and not np.isclose(distance_from_center, min_radius):<EOL><INDENT>return None<EOL><DEDENT>if (distance_from_center > max_radius) and not np.isclose(distance_from_center, max_radius):<EOL><INDENT>return None<EOL><DEDENT>x = point.real<EOL>y = point.imag<EOL>end_angle = self.theta + self.delta<EOL>min_angle = min(self.theta, end_angle)<EOL>max_angle = max(self.theta, end_angle)<EOL>acos_arg = (x - self.center.real) / self.radius.real<EOL>if acos_arg > <NUM_LIT:1.0>:<EOL><INDENT>acos_arg = <NUM_LIT:1.0><EOL><DEDENT>elif acos_arg < -<NUM_LIT:1.0>:<EOL><INDENT>acos_arg = -<NUM_LIT:1.0><EOL><DEDENT>x_angle_0 = degrees(acos(acos_arg))<EOL>while x_angle_0 < min_angle:<EOL><INDENT>x_angle_0 += <NUM_LIT><EOL><DEDENT>while x_angle_0 > max_angle:<EOL><INDENT>x_angle_0 -= <NUM_LIT><EOL><DEDENT>x_angle_1 = -<NUM_LIT:1.0> * x_angle_0<EOL>while x_angle_1 < min_angle:<EOL><INDENT>x_angle_1 += <NUM_LIT><EOL><DEDENT>while x_angle_1 > max_angle:<EOL><INDENT>x_angle_1 -= <NUM_LIT><EOL><DEDENT>t_x_0 = (x_angle_0 - self.theta) / self.delta<EOL>t_x_1 = (x_angle_1 - self.theta) / self.delta<EOL>asin_arg = (y - self.center.imag) / self.radius.imag<EOL>if asin_arg > <NUM_LIT:1.0>:<EOL><INDENT>asin_arg = <NUM_LIT:1.0><EOL><DEDENT>elif asin_arg < -<NUM_LIT:1.0>:<EOL><INDENT>asin_arg = -<NUM_LIT:1.0><EOL><DEDENT>y_angle_0 = degrees(asin(asin_arg))<EOL>while y_angle_0 < min_angle:<EOL><INDENT>y_angle_0 += <NUM_LIT><EOL><DEDENT>while y_angle_0 > max_angle:<EOL><INDENT>y_angle_0 -= <NUM_LIT><EOL><DEDENT>y_angle_1 = <NUM_LIT> - y_angle_0<EOL>while y_angle_1 < min_angle:<EOL><INDENT>y_angle_1 += <NUM_LIT><EOL><DEDENT>while y_angle_1 > max_angle:<EOL><INDENT>y_angle_1 -= <NUM_LIT><EOL><DEDENT>t_y_0 = (y_angle_0 - self.theta) / self.delta<EOL>t_y_1 = (y_angle_1 - self.theta) / self.delta<EOL>t = None<EOL>if np.isclose(t_x_0, t_y_0):<EOL><INDENT>t = (t_x_0 + t_y_0) / <NUM_LIT><EOL><DEDENT>elif np.isclose(t_x_0, t_y_1):<EOL><INDENT>t= (t_x_0 + t_y_1) / <NUM_LIT><EOL><DEDENT>elif np.isclose(t_x_1, t_y_0):<EOL><INDENT>t = (t_x_1 + t_y_0) / <NUM_LIT><EOL><DEDENT>elif np.isclose(t_x_1, t_y_1):<EOL><INDENT>t = (t_x_1 + t_y_1) / <NUM_LIT><EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>if (t >= <NUM_LIT:0.0>) and (t <= <NUM_LIT:1.0>):<EOL><INDENT>return t<EOL><DEDENT>return None<EOL>
If the point lies on the Arc, returns its `t` parameter.
        If the point does not lie on the Arc, returns None.
        This function only works on Arcs with rotation == 0.0