FloatValueInterpolator(Alpha alpha, float k[], float v[]) {

	super(alpha);

        // Check that first knot = 0.0f
        knotsLength = k.length;
        if (k[0] < -0.0001 || k[0] > 0.0001) {
            throw new IllegalArgumentException(J3dUtilsI18N.getString("FloatValueInterpolator0"));
        }

        // Check that last knot = 1.0f
        if ((k[knotsLength-1] - 1.0f) < -0.0001 ||
            (k[knotsLength-1] - 1.0f) > 0.0001) {

            throw new IllegalArgumentException(J3dUtilsI18N.getString("FloatValueInterpolator1"));
        }

        // Check to see that knots are in ascending order and copy them
        this.knots = new float[knotsLength];
        for (int i = 0; i < knotsLength; i++)  {
            if ((i > 0) && (k[i] < k[i-1])) {
                throw new IllegalArgumentException(J3dUtilsI18N.getString("FloatValueInterpolator2"));
            }
            this.knots[i] = k[i];
        }

        // check to see that we have the same number of values as knots
	if (knotsLength != v.length) {
	   throw new IllegalArgumentException(J3dUtilsI18N.getString("FloatValueInterpolator3"));
        }

        // copy the values
	this.values = new float[knotsLength];
	for(int i = 0; i < knotsLength; i++) {
	    this.values[i] = v[i];
	}

    }