Converted the spline inverter to operate on a customizable number of dimensions