commit
507cb5fba3
2 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
version = "0.0.7"
|
||||
version = "0.0.8"
|
||||
author = "Andre von Houck and Ryan Oldenburg"
|
||||
description = "Full-featured 2d graphics library for Nim."
|
||||
license = "MIT"
|
||||
|
|
|
@ -498,12 +498,12 @@ proc commandsToPolygons*(commands: seq[PathCommand]): seq[seq[Vec2]] =
|
|||
if polygon.len > 0:
|
||||
result.add(polygon)
|
||||
|
||||
iterator zipline[T](s: seq[T]): (T, T) =
|
||||
iterator zipline*[T](s: seq[T]): (T, T) =
|
||||
## Return elements in pairs: (1st, 2nd), (2nd, 3rd) ... (nth, last).
|
||||
for i in 0 ..< s.len - 1:
|
||||
yield(s[i], s[i + 1])
|
||||
|
||||
iterator segments(s: seq[Vec2]): Segment =
|
||||
iterator segments*(s: seq[Vec2]): Segment =
|
||||
## Return elements in pairs: (1st, 2nd), (2nd, 3rd) ... (last, 1st).
|
||||
for i in 0 ..< s.len - 1:
|
||||
yield(Segment(at: s[i], to: s[i + 1]))
|
||||
|
|
Loading…
Reference in a new issue