From f8a17da00e99893b797a469fc0f85d7f8a6c4f33 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Thu, 8 Feb 2024 17:48:55 +0100 Subject: [PATCH] add converter mps to kph --- src/convert_kph_to_mps.c | 5 +++++ src/convert_kph_to_mps.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/convert_kph_to_mps.c b/src/convert_kph_to_mps.c index 02b5c60..ddb0da4 100644 --- a/src/convert_kph_to_mps.c +++ b/src/convert_kph_to_mps.c @@ -3,4 +3,9 @@ double converter_kph_to_mps(double kph){ double speed = kph / 3.6; return speed; +} + +double converter_mps_to_kph(double mps){ + double speed = mps * 3.6; + return speed; } \ No newline at end of file diff --git a/src/convert_kph_to_mps.h b/src/convert_kph_to_mps.h index 467bc72..c4a8592 100644 --- a/src/convert_kph_to_mps.h +++ b/src/convert_kph_to_mps.h @@ -2,5 +2,6 @@ #define THEADMIRALS_CONVERT_KPH_TO_MPS_H double converter_kph_to_mps(double kph); +double converter_mps_to_kph(double mps); #endif //THEADMIRALS_CONVERT_KPH_TO_MPS_H