parameters: (self, box)
return_statement: return (top_left.x < self.x and
              top_left.y < self.y and
              bottom_right.x > self.x and
              bottom_right.y > self.y)
docstring: Is this point inside the (centre, size) box box
docstring_summary: Is this point inside the (centre, size) box box
docstring_tokens: Is this point inside the ( centre size ) box box
function: def is_within_box(self, box):
          """Is this point inside the (centre, size) box box"""
          centre, size = box
          half_size = size.scale(0.5)
          top_left = centre - half_size
          bottom_right = centre + half_size
          return (top_left.x < self.x and
              top_left.y < self.y and
              bottom_right.x > self.x and
              bottom_right.y > self.y)
function_tokens: def is_within_box ( self , box ) : centre , size = box half_size = size . scale ( 0.5 ) top_left = centre - half_size bottom_right = centre + half_size return ( top_left . x < self . x and top_left . y < self . y and bottom_right . x > self . x and bottom_right . y > self . y )