class UcteConverterHelper {

    public static double calculateSymmAngleDu(TwoWindingsTransformer twoWindingsTransformer) {
        double alphaMin = Double.MAX_VALUE;
        double alphaMax = -Double.MAX_VALUE;

        PhaseTapChanger tapChanger = twoWindingsTransformer.getPhaseTapChanger();
        for (int i = tapChanger.getLowTapPosition(); i <= tapChanger.getHighTapPosition(); ++i) {
            alphaMin = Double.min(alphaMin, tapChanger.getStep(i).getAlpha());
            alphaMax = Double.max(alphaMax, tapChanger.getStep(i).getAlpha());
        }
        alphaMin = Math.toRadians(alphaMin);
        alphaMax = Math.toRadians(alphaMax);

        return 100 * (2 * (Math.tan(alphaMax / 2) - Math.tan(alphaMin / 2)) / (tapChanger.getStepCount() - 1));
    }

    private  UcteConverterHelper();

}