racket / pict

Other
15 stars 20 forks source link

Fix internal error where source and dest are the same #68

Closed camoy closed 3 years ago

camoy commented 3 years ago

The pin-line, pin-arrow-line, pin-arrows-line, and pip-arrow-line functions fail with an internal error when the source and destination are at the same location because it attempts to calculate the angle between the two with atan which fails on (atan 0 0). This commit uses an angle of 0 in this edge case.

rfindler commented 3 years ago

Thanks!