From 26be6feb20992002201d4b8876b456bd8e53bad3 Mon Sep 17 00:00:00 2001 From: tafaar Date: Tue, 8 Nov 2022 17:52:13 -0800 Subject: finished windchill function --- BlankConsoleLab/BlankConsoleLab.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'BlankConsoleLab/BlankConsoleLab.cpp') diff --git a/BlankConsoleLab/BlankConsoleLab.cpp b/BlankConsoleLab/BlankConsoleLab.cpp index 5058631..2fdbd15 100644 --- a/BlankConsoleLab/BlankConsoleLab.cpp +++ b/BlankConsoleLab/BlankConsoleLab.cpp @@ -49,9 +49,12 @@ bool CheckWindSpeed(float& input) { } -float CalculateWindChill(float fahrenheit, float speed) { +void CalculateWindChill() { - 35.74 + (0.6215 * tempFahrenheit) + (pow(windSpeed, 0.16) * ((0.4275 * tempFahrenheit) - 35.75)); + // Simply calculates the wind chill in fahrenheit, and converts it to celsius using a previous function + + windFahrenheit = 35.74 + (0.6215 * tempFahrenheit) + (pow(windSpeed, 0.16) * ((0.4275 * tempFahrenheit) - 35.75)); + windCelsius = ConvertTemperature(windFahrenheit, 'F'); } -- cgit v1.2.3