I don't really know much about this level of math, but by purely looking at the debug values and doing som trial&error, it seems that this is the...