11// COPYRIGHT 2010, 2011, 2014, 2015 by the Open Rails project.
2- //
2+ //
33// This file is part of Open Rails.
4- //
4+ //
55// Open Rails is free software: you can redistribute it and/or modify
66// it under the terms of the GNU General Public License as published by
77// the Free Software Foundation, either version 3 of the License, or
88// (at your option) any later version.
9- //
9+ //
1010// Open Rails is distributed in the hope that it will be useful,
1111// but WITHOUT ANY WARRANTY; without even the implied warranty of
1212// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313// GNU General Public License for more details.
14- //
14+ //
1515// You should have received a copy of the GNU General Public License
1616// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717
1818using Microsoft . Xna . Framework ;
19- using System ;
20- using System . Diagnostics ;
2119
2220namespace Orts . Simulation
2321{
@@ -38,19 +36,22 @@ public class Weather
3836
3937 // Overcast factor: 0.0 = almost no clouds; 0.1 = wispy clouds; 1.0 = total overcast.
4038 public float OvercastFactor ;
41-
39+
4240 // Pricipitation intensity in particles per second per meter^2 (PPSPM2).
4341 public float PricipitationIntensityPPSPM2 ;
44-
42+
4543 // Fog/visibility distance. Ranges from 10m (can't see anything), 5km (medium), 20km (clear) to 100km (clear arctic).
4644 public float FogDistance ;
47-
45+
4846 // Precipitation liquidity; =1 for rain, =0 for snow; intermediate values possible with dynamic weather;
4947 public float PrecipitationLiquidity ;
48+
5049 public float CalculatedWindDirection ;
51- public Vector2 WindSpeedMpS = new Vector2 ( ) ;
52- public float WindSpeed { get { return WindSpeedMpS . Length ( ) ; } }
53- // public float WindDirection { get { return (float)Math.Atan2(WindSpeedMpS.X, WindSpeedMpS.Y); } }
54- public float WindDirection { get { return CalculatedWindDirection ; } }
50+
51+ public Vector2 WindSpeedMpS ;
52+
53+ public float WindSpeed => WindSpeedMpS . Length ( ) ;
54+
55+ public float WindDirection => CalculatedWindDirection ;
5556 }
5657}
0 commit comments