Added a function for calculating the derivatve of the BSpline.