class TriangleVerticesCalculator {

    public float[] getScale_PreserveAspectFit(int angle, int widthIn, int heightIn, int widthOut, int heightOut) {
        scale[0] = scale[1] = 1;
        if (angle == 90 || angle == 270) {
            int cx = widthIn;
            widthIn = heightIn;
            heightIn = cx;
        }

        float aspectRatioIn = (float) widthIn / (float) heightIn;
        float heightOutCalculated = (float) widthOut / aspectRatioIn;

        if (heightOutCalculated < heightOut) {
            scale[1] = heightOutCalculated / heightOut;
        } else {
            scale[0] = heightOut * aspectRatioIn / widthOut;
        }

        return scale;
    }

    public  TriangleVerticesCalculator();
    public  TriangleVerticesCalculator(float[] triangleVerticesData);

}