Skip to content

Commit 3c5bb31

Browse files
committed
Automatic merge of T1.5.1-351-gc9abcd22b and 7 pull requests
- Pull request #570 at 14abf7a: Experimental glTF 2.0 support with PBR lighting - Pull request #732 at 1edb2e5: Improvements for air brakes - Pull request #751 at 00981a2: Web interface to control cab controls with external hardware - Pull request #767 at 82c5f1c: Refine sunrise and sunset - Pull request #803 at 7157e08: Various adjustments to steam adhesion - Pull request #809 at f67822a: Some on-screen messages not suppressed, Bug #2008012 - Pull request #813 at a8e9d9b: Refactored garbage generators
9 parents 9bc16f6 + c9abcd2 + 14abf7a + 1edb2e5 + 00981a2 + 82c5f1c + 7157e08 + f67822a + a8e9d9b commit 3c5bb31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/RunActivity/Viewer3D/Common/SunMoonPos.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ public static Vector3 SolarAngle(double latitude, double longitude, EnvironmentF
9494
var solarAzimuthCosine = (Math.Sin(solarDeclination) - (solarZenithCosine * Math.Sin(latitude))) / (Math.Sin(Math.Acos(solarZenithCosine)) * Math.Cos(latitude));
9595
var solarAzimuthSine = -Math.Sin(solarHourAngle) * Math.Cos(solarDeclination) / Math.Sin(Math.Acos(solarZenithCosine));
9696

97-
sunDirection.X = (float)solarZenithSine * (float)solarAzimuthSine;
97+
sunDirection.X = (float)(solarZenithSine * solarAzimuthSine);
9898
sunDirection.Y = (float)solarZenithCosine;
99-
sunDirection.Z = -(float)solarZenithSine * (float)solarAzimuthCosine;
99+
sunDirection.Z = -(float)(solarZenithSine * solarAzimuthCosine);
100100
sunDirection.Normalize();
101101

102102
return sunDirection;

0 commit comments

Comments
 (0)