Changeset 89 for nodebox/trunk/src/DrawingPrimitives.py
- Timestamp:
- 02/15/07 21:44:23 (23 months ago)
- Files:
-
- 1 modified
-
nodebox/trunk/src/DrawingPrimitives.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
nodebox/trunk/src/DrawingPrimitives.py
r88 r89 268 268 raise NodeBoxError, "The given path is empty" 269 269 270 delta = 1.0/amount 270 # The delta value is divided by amount - 1, because we also want the last point (t=1.0) 271 # If I wouldn't use amount - 1, I fall one point short of the end. 272 # E.g. if amount = 4, I want point at t 0.0, 0.33, 0.66 and 1.0, 273 # if amount = 2, I want point at t 0.0 and t 1.0 274 try: 275 delta = 1.0/(amount-1) 276 except ZeroDivisionError: 277 delta = 1.0 278 271 279 for i in xrange(amount): 272 280 yield self.point(delta*i)
