Skip to content

Commit

Permalink
Added KilometersPerHourToMetersPerSecond() method (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Mar 5, 2023
1 parent e7d371d commit a82ee75
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 @@ -62,5 +62,12 @@ public static class Speeds
/// <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;

/// <summary>
/// Converts kilometers per hour to meters per second.
/// </summary>
/// <param name="kilometersPerHour">The speed in kilometers per hour.</param>
/// <returns>The equivalent speed in meters per second.</returns>
public static double KilometersPerHourToMetersPerSecond(double kilometersPerHour) => kilometersPerHour / 3.6;
}
}

0 comments on commit a82ee75

Please sign in to comment.