23a4149778
Correct the code to actually do what the comment says. This fixes an issue where the curve would flip 180 degrees under certain conditions.