In other words, if fS = 0 and the right side of (F.6.5.6) is greater than 0, then subtract 360°, whereas if fS = 1 and the right side of (F.6.5.6) is less than 0, then add 360°. In all other cases leave it as is.
The code should read around something like this:
if (fs == 0 && da > 0)
da -= 2 * NSVG_PI;
else if (fs == 1 && da < 0)
da += 2 * NSVG_PI;
If following the W3 specification here: https://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes , the code: https://github.com/memononen/nanosvg/blob/master/src/nanosvg.h#L2082 is likely wrong, since fa is checked (should be fs). See Step 4 in section F.6.5 that says:
The code should read around something like this: