I don't know if this helps to understand, don't think so, but the input X and Y, B and A are swapped, I just inverted the parameters I used to them and this was "fixed", so it is fine