summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortafaar <[email protected]>2022-11-08 17:52:13 -0800
committertafaar <[email protected]>2022-11-08 17:52:13 -0800
commit26be6feb20992002201d4b8876b456bd8e53bad3 (patch)
treee981283df80a70e795cfe22156a86c590c3f8d5b
parentadded variables (diff)
downloadcst116-lab2-hill-26be6feb20992002201d4b8876b456bd8e53bad3.tar.xz
cst116-lab2-hill-26be6feb20992002201d4b8876b456bd8e53bad3.zip
finished windchill function
-rw-r--r--BlankConsoleLab/BlankConsoleLab.cpp7
1 files changed, 5 insertions, 2 deletions
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');
}