public double getMinimumDifference_as_double(){
        double diff = 0.0D;
        if(this.type==0 || this.type==1){
            ArrayMaths am = this.sort();
            double[] sorted = am.getArray_as_double();
            diff = sorted[1] - sorted[0];
            double minDiff = diff;
            for(int i=1; i<this.length-1; i++){
                diff = sorted[i+1] - sorted[i];
                if(diff<minDiff)minDiff = diff;
            }
        }
        else{
            throw new IllegalArgumentException("Minimum difference may only be returned as the same type as the type of the internal array - you are trying to return as double or Double the difference for a " + this.typeName[this.type] +"[] array");
        }
        return diff;
    }