What is the motivation here to use pointers instead of references? Maybe it is more visible that they are output arguments?
Also why did we change the order? It feels better that the input argument comes first, then the output. So the pointers should be the last 2 args.