You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* rfac: Change global constant `zeroPoint` into a static property on `Point` and adjust everywhere where it was being used.
* rfac: Change `drawSolidPolygon` to take a new struct `Polygon` instead of `[Point]`.
- This allows us to be sure that, in each renderer, there will always be at least 3 points, avoiding having to check for that in every renderer.
- This moves the problem of ensuring that there are always 3 points up the stack, making sure that the programmer ensures this as soon as possible by taking advantage of the type system, while letting the rest of the code not worry about this.
* rfac: Reorder init.
* docs: Fix documentation for `drawSolidPolygon`
* bfix: Change `drawPlotLines` to draw a single polyline.
* rfac: Don't be clever with iterators.
* Add a failable initializer taking an array of points which returns `nil` if `points` doesn't have enough points.
* rfac: Improve rules of `.step` so no lines with 0 or 1 points are asked to draw.
There is no change in the output.
This change is the same as the one made in PR #64.
* rfac: `drawPlotLines` now takes a new struct `Polyline` instead of an array of points.
This has the same advantage as the `Polygon` of making the user handle the fact that it needs at least 3 points, as early as possible and preserving that fact in the type itself.
* chor: Rename `drawPlotLines` to `drawPolyline`
* Change Polyline and Polygon to internally use just an array with a precondition on the `didSet` one single failable initializer.
* Make requested changes and corrections from review
- Correct precondition check
- Remove label from `drawSolidPolygon`
- Make a variadic version of the initialiser for `Polyline` and `Polygon`
0 commit comments