First, thank you for your package, for developing it on GitHub, and for having a nice suite of tests for it!
This PR fixes handling of horizontal and vertical lines. The previous code would return NA in some cases because of a division by zero. I'm not confident at all that my proposed fix is the most simple or most efficient, but perhaps it will give a clue for a better fix. For example, maybe there's a simple way to handle all cases together, rather than handling vertical and horizontal lines separately from other types of lines (as I do in the commit).
By the way, cool style for entering matrices in the tests. I haven't seen that style before.
Here are a couple of examples for what this PR fixes:
First, thank you for your package, for developing it on GitHub, and for having a nice suite of tests for it!
This PR fixes handling of horizontal and vertical lines. The previous code would return NA in some cases because of a division by zero. I'm not confident at all that my proposed fix is the most simple or most efficient, but perhaps it will give a clue for a better fix. For example, maybe there's a simple way to handle all cases together, rather than handling vertical and horizontal lines separately from other types of lines (as I do in the commit).
By the way, cool style for entering matrices in the tests. I haven't seen that style before.
Here are a couple of examples for what this PR fixes: