First guess from my side is that you add a value without a unit to a quantity with a unit.
E.g. What is 120 Apples + 60 (whatevers)? There is no correct answer.
But 120 Apples x 0,5 makes sense, it is simply 60 Apples.
Have you tried converting the second value to a quantity with an equal UOM?
I‘m wondering, the second value (SunEnter) has a proper UOM. Pls see the console log. It shows 60°
The result of the calculation of WindowAzimut (120°) x 0,5 = 60° and is stored in SunEnter. In log SunEnter shows 60° with UOM. The error occurred when I than add SunEnter (60°) to WindowAzimut (120°). Both with proper UOM.
I wrote a small unit test to see if and why this happens in Java code as well.
It also happens in the Java code.
The reason seems to be that during the calculation degrees are converted to radians because the degree angle unit is expressed in radians in the UoM library: