sprang/Inkpad — pull request #62 by 32Beat (2014-01-07 10:05:07+00:00)
Title: Rewrite of WDBezierSegmentIsFlat

Previous version would incorrectly report true in some cases, particularly when:
seg.a_ == seg.b_ and (seg.a_ != seg.in_ or seg.out_ != seg.b_)

Note that there are also cases where the segment may be flat, but can not be approximated by a line between seg.a_ and seg.b_, e.g. all segment's coordinates in one direction are equal

Note also that even CoreGraphics seems to make a mistake. The attached images show a path where seg.a_ == seg.b_ (left) and the same path with same properties on the right where seg.a_ != seg.b_. (Drawn with the new routine).

![screen shot 2014-01-07 at 10 48 31 am](https://f.cloud.github.com/assets/786628/1857946/2818b48a-7783-11e3-92f5-5d5d633780ed.png)
![screen shot 2014-01-07 at 10 48 51 am](https://f.cloud.github.com/assets/786628/1857949/2d837e32-7783-11e3-8adf-972fae652891.png)