Closed sueka closed 6 years ago
@sueka Thanks for the PR!
If you can fix NoMethodError: undefined method
zero?' for nil:NilClass`, I'll take a closer look.
@Ch4s3
Fixed it. I think there are two ways to fix the NoMethodError
: the other is by using safe navigation operator to call zero?
method.
This looks pretty good. Can you perhaps add a couple of test cases that would have previously caused zero division & zero vector normalization errors but are handled now?
I hate to keep throwing up barriers, but this is a tricky section of code, so I want to make sure we don't have a regression here.
Again @sueka thanks a ton. Once we get this in I'll roll out a new gem version. I'll try to get this into 2.2.1
with #174 if you can get to this soon, otherwise I'll roll it into2.3
with #162.
I've added tests against zero vector normalization and zero division errors.
Awesome, thanks again for the great contribution!
I've tried doing
0.0 / 0.0
)