There are cross if/else conditions. Looks like the first if should test for the outer bounds of 0..1 or the second if should test against 0/1. The same is valid for the QubicSegment as well.
I not really deep into math, I do not understand everything, so I would appreciate any explanation of this condition.
Hello! I'm trying to port you amazing library to the pure rust (almost brainlessly) and I found confusing part in the SignedDistance calculation:
https://github.com/Chlumsky/msdfgen/blob/eeec8f222d0b06f2636ccb3b9dda3f6c3f00d25c/core/edge-segments.cpp#L183-L188
There are cross if/else conditions. Looks like the first
if
should test for the outer bounds of0..1
or the secondif
should test against0/1
. The same is valid for theQubicSegment
as well.I not really deep into math, I do not understand everything, so I would appreciate any explanation of this condition.
Thank you for a great job!