コード例 #1
0
ファイル: UnitExtensions.cs プロジェクト: sotaria/gsf
 /// <summary>
 /// Calculates an average of the specified sequence of <see cref="Angle"/> values.
 /// </summary>
 /// <param name="source">Sequence of <see cref="Angle"/> values over which to calculate average.</param>
 /// <returns>Average of the specified sequence of <see cref="Angle"/> values.</returns>
 /// <remarks>
 /// For Angles that wrap, e.g., between -180 and +180, this algorithm takes the wrapping into account when calculating the average.
 /// </remarks>
 public static Angle Average(this IEnumerable <Angle> source)
 {
     return(Angle.Average(source));
 }
コード例 #2
0
ファイル: UnitExtensions.cs プロジェクト: sotaria/gsf
 /// <summary>
 /// Unwraps a set of <see cref="Angle"/> values so a comparable mathematical operation can be applied.
 /// </summary>
 /// <param name="source">Sequence of <see cref="Angle"/> values to unwrap.</param>
 /// <returns>Unwrapped set of <see cref="Angle"/> values.</returns>
 /// <remarks>
 /// For Angles that wrap, e.g., between -180 and +180, this algorithm unwraps the values to make the values mathematically comparable.
 /// </remarks>
 public static IEnumerable <Angle> Unwrap(this IEnumerable <Angle> source)
 {
     return(Angle.Unwrap(source));
 }