refactor/extract bilinear interpolation for possible extension to another interpolation method (e.g. bicubic)