Selaa lähdekoodia

Add docstring to the Bbox contains

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54913 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli 12 vuotta sitten
vanhempi
commit
45f2d696ea
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 8 0
      lib/python/pygrass/vector/basic.py

+ 8 - 0
lib/python/pygrass/vector/basic.py

@@ -98,6 +98,14 @@ class Bbox(object):
                                                  e=self.east, w=self.west)
 
     def contains(self, point):
+        """Return True if the object is contained by the BoundingBox. ::
+
+            >>> bbox = Bbox(north=10, south=0, west=0, east=10)
+            >>> bbox.contains(point)
+            True
+
+        ..
+        """
         return bool(libvect.Vect_point_in_box(point.x, point.y,
                                               point.z if point.z else 0,
                                               self.c_bbox))