original_docstring: Return the points on the line.
docstring: Return the points on the line.
docstring_tokens: Return the points on the line .
code: def points(self) -> list[Point]:
          """Return the points on the line."""
          if (
              abs(self.start.x - self.end.x) != abs(self.start.y - self.end.y)  # 45 degrees
              and abs(self.start.x - self.end.x) != 0  # vertical
              and abs(self.start.y - self.end.y) != 0  # horizontal
          ):
              raise RuntimeError(f"{self} not 90 nor 45 degrees")
  
          if self.start == self.end:
              steps = 1
          elif abs(self.start.x - self.end.x) != 0:
              steps = abs(self.start.x - self.end.x)
          else:
              steps = abs(self.start.y - self.end.y)
  
          dir_x = (self.end.x - self.start.x) / steps
          dir_y = (self.end.y - self.start.y) / steps
          return [
              Point(self.start.x + dir_x * i, self.start.y + dir_y * i)
              for i in range(steps + 1)
          ]
code_tokens: def points ( self ) -> list [ Point ] : if ( abs ( self . start . x - self . end . x ) != abs ( self . start . y - self . end . y ) and abs ( self . start . x - self . end . x ) != 0 and abs ( self . start . y - self . end . y ) != 0 ) : raise RuntimeError ( f"{self} not 90 nor 45 degrees" ) if self . start == self . end : steps = 1 elif abs ( self . start . x - self . end . x ) != 0 : steps = abs ( self . start . x - self . end . x ) else : steps = abs ( self . start . y - self . end . y ) dir_x = ( self . end . x - self . start . x ) / steps dir_y = ( self . end . y - self . start . y ) / steps return [ Point ( self . start . x + dir_x * i , self . start . y + dir_y * i ) for i in range ( steps + 1 ) ]
short_docstring: Return the points on the line.
short_docstring_tokens: Return the points on the line .
comment: """Return the points on the line."""$SEP$# 45 degrees$SEP$# vertical$SEP$# horizontal