Adds 2 and 3d linear interpolation