private void init() {
        this.cSinA = new double[this.cSteps - 1];
        this.cCosA = new double[this.cSteps - 1];

        for (int var3 = 0; var3 < this.cSteps - 1; ++var3) {
            double var1 = this.getAlpha(var3) * 3.141592653589793D / 180.0D;
            this.cSinA[var3] = Math.sin(var1);
            this.cCosA[var3] = Math.cos(var1);
        }

        this.cDMin = -this.cImage.getWidth();
        final double cDStep = 1.0D;
        final int cDCount =
                (int) (2.0D * (double) (this.cImage.getWidth() + this.cImage.getHeight()) / cDStep);
        this.cHMatrix = new int[cDCount * this.cSteps];
    }
Copied and pasted from Tess4j (https://sourceforge.net/projects/tess4j/)
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-ocr-module/src/main/java/org/apache/tika/parser/ocr/tess4j/ImageDeskew.java