C# Class GSF.Units.UnitExtensions

Defines extension functions related to unit structures.
Mostra file Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
Average ( this source ) : Angle

Calculates an average of the specified sequence of Angle values.

For Angles that wrap, e.g., between -180 and +180, this algorithm takes the wrapping into account when calculating the average.

Unwrap ( this source ) : IEnumerable

Unwraps a set of Angle values so a comparable mathematical operation can be applied.

For Angles that wrap, e.g., between -180 and +180, this algorithm unwraps the values to make the values mathematically comparable.

Method Details

Average() public static method

Calculates an average of the specified sequence of Angle values.
For Angles that wrap, e.g., between -180 and +180, this algorithm takes the wrapping into account when calculating the average.
public static Average ( this source ) : Angle
source this Sequence of values over which to calculate average.
return Angle

Unwrap() public static method

Unwraps a set of Angle values so a comparable mathematical operation can be applied.
For Angles that wrap, e.g., between -180 and +180, this algorithm unwraps the values to make the values mathematically comparable.
public static Unwrap ( this source ) : IEnumerable
source this Sequence of values to unwrap.
return IEnumerable