def drawSector(self, center, point, beta, fullSector=True):
center = Point(center)<EOL>point = Point(point)<EOL>l3 = "<STR_LIT>"<EOL>l4 = "<STR_LIT>"<EOL>l5 = "<STR_LIT>"<EOL>betar = math.radians(-beta)<EOL>w360 = math.radians(math.copysign(<NUM_LIT>, betar)) * (-<NUM_LIT:1>)<EOL>w90  = math.radians(math.copysign(<NUM_LIT>, betar))<EOL>w45  = w90 / <NUM_LIT:2><EOL>while abs(betar) > <NUM_LIT:2> * math.pi:<EOL><INDENT>betar += w360                       <EOL><DEDENT>if not (self.lastPoint == point):<EOL><INDENT>self.draw_cont += l3 % JM_TUPLE(point * self.ipctm)<EOL>self.lastPoint = point<EOL><DEDENT>Q = Point(<NUM_LIT:0>, <NUM_LIT:0>)                    <EOL>C = center<EOL>P = point<EOL>S = P - C                               <EOL>rad = abs(S)                            <EOL>if not rad > <NUM_LIT>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>alfa = self.horizontal_angle(center, point)<EOL>while abs(betar) > abs(w90):            <EOL><INDENT>q1 = C.x + math.cos(alfa + w90) * rad<EOL>q2 = C.y + math.sin(alfa + w90) * rad<EOL>Q = Point(q1, q2)              <EOL>r1 = C.x + math.cos(alfa + w45) * rad / math.cos(w45)<EOL>r2 = C.y + math.sin(alfa + w45) * rad / math.cos(w45)<EOL>R = Point(r1, r2)              <EOL>kappah = (<NUM_LIT:1> - math.cos(w45)) * <NUM_LIT:4> / <NUM_LIT:3> / abs(R - Q)<EOL>kappa = kappah * abs(P - Q)<EOL>cp1 = P + (R - P) * kappa           <EOL>cp2 = Q + (R - Q) * kappa           <EOL>self.draw_cont += l4 % JM_TUPLE(list(cp1 * self.ipctm) +list(cp2 * self.ipctm) +list(Q * self.ipctm))<EOL>betar -= w90                        <EOL>alfa  += w90                        <EOL>P = Q                               <EOL><DEDENT>if abs(betar) > <NUM_LIT>:                   <EOL><INDENT>beta2 = betar / <NUM_LIT:2><EOL>q1 = C.x + math.cos(alfa + betar) * rad<EOL>q2 = C.y + math.sin(alfa + betar) * rad<EOL>Q = Point(q1, q2)              <EOL>r1 = C.x + math.cos(alfa + beta2) * rad / math.cos(beta2)<EOL>r2 = C.y + math.sin(alfa + beta2) * rad / math.cos(beta2)<EOL>R = Point(r1, r2)              <EOL>kappah = (<NUM_LIT:1> - math.cos(beta2)) * <NUM_LIT:4> / <NUM_LIT:3> / abs(R - Q) <EOL>kappa = kappah * abs(P - Q) / (<NUM_LIT:1> - math.cos(betar))<EOL>cp1 = P + (R - P) * kappa           <EOL>cp2 = Q + (R - Q) * kappa           <EOL>self.draw_cont += l4 % JM_TUPLE(list(cp1 * self.ipctm) +list(cp2 * self.ipctm) +list(Q * self.ipctm))<EOL><DEDENT>if fullSector:<EOL><INDENT>self.draw_cont += l3 % JM_TUPLE(point * self.ipctm)<EOL>self.draw_cont += l5 % JM_TUPLE(center * self.ipctm)<EOL>self.draw_cont += l5 % JM_TUPLE(Q * self.ipctm)<EOL><DEDENT>self.lastPoint = Q<EOL>return self.lastPoint<EOL>
Draw a circle sector.