Skip to content

Commit

Permalink
Added KnotsToMilesPerHour() method (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Mar 5, 2023
1 parent cb7f5fb commit cf047a2
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 @@ -48,5 +48,12 @@ public static class Speeds
/// <param name="kilometersPerHour">The speed in kilometers per hour.</param>
/// <returns>The equivalent speed in knots.</returns>
public static double KilometersPerHourToKnots(double kilometersPerHour) => kilometersPerHour / 1.852;

/// <summary>
/// Converts knots to miles per hour.
/// </summary>
/// <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;
}
}

0 comments on commit cf047a2

Please sign in to comment.