Skip to content

Commit

Permalink
Added MilesPerHourToKilometersPerHour() (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Mar 5, 2023
1 parent 9549000 commit 5cb0e57
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 @@ -76,5 +76,12 @@ public static class Speeds
/// <param name="metersPerSecond">The speed in meters per second.</param>
/// <returns>The equivalent speed in kilometers per hour.</returns>
public static double MetersPerSecondToKilometersPerHour(double metersPerSecond) => metersPerSecond * 3.6;

/// <summary>
/// Converts miles per hour to kilometers per hour.
/// </summary>
/// <param name="milesPerHour">The speed in miles per hour.</param>
/// <returns>The equivalent speed in kilometers per hour.</returns>
public static double MilesPerHourToKilometersPerHour(double milesPerHour) => milesPerHour * 1.60934;
}
}

0 comments on commit 5cb0e57

Please sign in to comment.