diff options
| author | tafaar <[email protected]> | 2022-11-08 17:52:13 -0800 |
|---|---|---|
| committer | tafaar <[email protected]> | 2022-11-08 17:52:13 -0800 |
| commit | 26be6feb20992002201d4b8876b456bd8e53bad3 (patch) | |
| tree | e981283df80a70e795cfe22156a86c590c3f8d5b | |
| parent | added variables (diff) | |
| download | cst116-lab2-hill-26be6feb20992002201d4b8876b456bd8e53bad3.tar.xz cst116-lab2-hill-26be6feb20992002201d4b8876b456bd8e53bad3.zip | |
finished windchill function
| -rw-r--r-- | BlankConsoleLab/BlankConsoleLab.cpp | 7 |
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'); } |