bSplines.c
// Function to decrease value of a knot.
// Decrements are made first to knotsTimes10 to work with integers and
// avoid round-off error problems.

Function to decrease value of a knot.
Decrements are made first to knotsTimes10 to work with integers and
avoid round-off error problems.
Function to decrease value of a knot . Decrements are made first to knotsTimes10 to work with integers and avoid round - off error problems .
void decreaseKnot(int i)
{
	if ( (i > 0) )
	{
		if (knotsTimes10[i] > knotsTimes10[i-1]) knotsTimes10[i] -= 1;
		else 
		{
			decreaseKnot(i-1);
			if (knotsTimes10[i] > knotsTimes10[i-1]) knotsTimes10[i] -= 1;
		}
	}
	if ( (i == 0 )  && ( knotsTimes10[i] > 0) ) knotsTimes10[i] -= 1;
    changeKnots();
}
void decreaseKnot ( int i ) { if ( ( i > 0 ) ) { if ( knotsTimes10 [ i ] > knotsTimes10 [ i - 1 ] ) knotsTimes10 [ i ] -= 1 ; else { decreaseKnot ( i - 1 ) ; if ( knotsTimes10 [ i ] > knotsTimes10 [ i - 1 ] ) knotsTimes10 [ i ] -= 1 ; } } if ( ( i == 0 ) && ( knotsTimes10 [ i ] > 0 ) ) knotsTimes10 [ i ] -= 1 ; changeKnots ( ) ; }
Function to decrease value of a knot.
Function to decrease value of a knot .