Friday, April 15, 2022

GUtility is gone!

 GUtility has now been removed from gateware. In its place is winutils.h. As of now the header includes a better solution for UTF8 to UTF16 conversions that prevents any issues with translation units by replacing an old static function with an overloaded inline function. Mac and Linux build also had their strlcpy replaced with calls to snprintf, which was what the old strlcpy macros were a layer ontop of.


the all new winutils.h! This is version 1.0

The next bug I fixed was a minor math library bug, in the GQuaternion file. SlerpF and SlerpD had been lacking code to handle an edge case where parallel quaternions were leading to a NaN state when calculations were ran. The fix to this issue was adding a check for the dot product in which if a dot product of 1 (or close to 1) is produced, Slerp will then use a normal Lerp in its place to prevent any divide by 0 scenarios.

The new if check to handle the edge case

Super great week! I was able to solve two bugs in the time I was working during the week! 


No comments:

Post a Comment