Class Wind
- Namespace
- SimpleWeather
- Assembly
- SimpleWeather.dll
Represents the wind section of the current weather response, including derived directions.
public class Wind
- Inheritance
-
Wind
- Inherited Members
Constructors
Wind(JToken?)
Initializes a new instance of the Wind class from JSON data.
public Wind(JToken? data)
Parameters
dataJTokenThe JSON token containing wind metrics.
Properties
Degree
Wind direction, degrees (meteorological)
public double? Degree { get; }
Property Value
Gust
Wind gust. Default Unit: meter/sec
public double? Gust { get; }
Property Value
Speed
Wind speed. Default Unit: meter/sec
public double? Speed { get; }
Property Value
WindDirectionLong
Long wind direction represented by a string (North, East, South, West, etc.)
public string? WindDirectionLong { get; }
Property Value
WindDirectionShort
Short wind direction represented by a string (N, E, S, W, etc.)
public string? WindDirectionShort { get; }
Property Value
Methods
GetWindDirectionLong(double?)
Converts a numeric wind bearing into the corresponding long compass representation.
public static string GetWindDirectionLong(double? windDegree)
Parameters
windDegreedouble?The meteorological wind degree.
Returns
- string
The long direction token (e.g., North, Northwest).
GetWindDirectionShort(double?)
Converts a numeric wind bearing into the corresponding short compass representation.
public static string GetWindDirectionShort(double? windDegree)
Parameters
windDegreedouble?The meteorological wind degree.
Returns
- string
The short direction token (e.g., N, NW).