Browse Source

returning at least 1 for grid size in getGridSizeFromSphere()

Josh Wilson 17 years ago
parent
commit
f6b0191067
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/distributed/CartesianGridBase.py

+ 1 - 1
direct/src/distributed/CartesianGridBase.py

@@ -52,7 +52,7 @@ class CartesianGridBase:
         sphereRadius = Vec3(xMax,yMax,0).length()
         
         # sphereRadius = max(sphereRadius, gridRadius*cellWidth)
-        return 2 * (sphereRadius // cellWidth)
+        return max(2 * (sphereRadius // cellWidth), 1)
 
     def getZoneCellOrigin(self, zoneId):
         # It returns the origin of the zoneCell