Linear interpolation of y values at given x values

Implements and closes #44.