AixLib.Airflow.WindowVentilation.BaseClasses.Functions.SmallestAngleDifference

# .AixLib.Airflow.WindowVentilation.BaseClasses.Functions.SmallestAngleDifference

Smallest difference between two angles around a point

## Information

This function finds the smallest difference between two angles around a point.

The difference is calculated as input angle 'ang1' to the reference angle 'ang2', positive value shows a clockwise direction from input to reference, i.e. shows a counter-clockwise by measurement.

#### Interface

>     function SmallestAngleDifference
>       input AixLib.Airflow.WindowVentilation.BaseClasses.Types.SmallestAngleDifferenceTypes typ = AixLib.Airflow.WindowVentilation.BaseClasses.Types.SmallestAngleDifferenceTypes.Range180;
>       input Modelica.Units.SI.Angle ang1 "Input angle";
>       input Modelica.Units.SI.Angle ang2 = 0 "Reference angle";
>       output Modelica.Units.SI.Angle angDif "Difference between two angels";
>     end SmallestAngleDifference;

## Revisions

- June 13, 2024, by Jun Jiang:
  First implementation (see issue 1492)

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos