math: added linear and spherical interpolation functions