Formula that the collocate tool uses

Hi. Does anyone know the formula that the Collocate tool uses? with Bilinear interpolation?

Yes, even I wanted to know the formula used there.

It is not easy to express this in a simple formula.

But you can have a look at the code:
Here the general Collocation is done:

And this is how the interpolation is implemented:

Thanks Marpet! Let me see what I can make out of this code.