Code: Select all
static inline DirDiff DirDifference(Direction d0, Direction d1)
{
return (DirDiff)((d0 + 8 - d1) % 8);
}
a + difference(a, b) = b,
which should be what you expect. Defining it the other way around results in unnatural minus signs. This should be avoided since it causes bugs.
This should be fixed as soon as possible.
Moreover, I have a little message for the dev team: Please be a little more careful when adding or changing code!