-
Hello! I'm trying to port you amazing library to the pure rust (almost brainlessly) and I found confusing part in the SignedDistance calculation: msdfgen/core/edge-segments.cpp Lines 183 to 188 in eeec8f2 There are cross if/else conditions. Looks like the first 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! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not sure I understand your point. The first condition checks if |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand your point. The first condition checks if
param
is between 0 and 1. Otherwise, the second condition splits the remaining possibilities -param
lower than 0 or greater than 1. It does so by comparing to 0.5, the value in the middle, but any value between 0 and 1 would work.