Skip to content

Commit

Permalink
Added MilesPerHourToKnots() method (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Mar 5, 2023
1 parent cf047a2 commit e7d371d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PeyrSharp.Core/Converters/Speeds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,12 @@ public static class Speeds
/// <param name="knots">The speed in knots.</param>
/// <returns>The equivalent speed in miles per hour.</returns>
public static double KnotsToMilesPerHour(double knots) => knots * 1.15078;

/// <summary>
/// Converts miles per hour to knots.
/// </summary>
/// <param name="milesPerHour">The speed in miles per hour.</param>
/// <returns>The equivalent speed in knots.</returns>
public static double MilesPerHourToKnots(double milesPerHour) => milesPerHour / 1.15078;
}
}

0 comments on commit e7d371d

Please sign in to comment.