this function seems never used (except in test). Usually eval() is called.
Can this be removed?
If not, can you change the interface to
const CubicSpline2d getSpline() const;