English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Old Wind Chill = 0.0817(3.71V0.5 + 5.81 – 0.25V)(T – 91.4) + 91.4

Thanks

2007-02-06 11:50:32 · 1 answers · asked by john f 1 in Computers & Internet Programming & Design

1 answers

Uh, how about any language. What does this mean:3.71V0.5?

Ok, I looked up the actual equation:

W = Wind Speed
T = Temp

Old Wind Chill = 0.0817(3.71 * sqrt(W) + 5.81 – 0.25W)(T – 91.4) + 91.4


In C, you basically just add * where you need to multiply:


#include
float getOldWindChill( float W, float T )
{
return 0.0817f*(3.71f*sqrt(W) + 5.81f – 0.25f*W)*(T – 91.4f) + 91.4f;
}

I put the f's on to avoid warnings about converting doubles to floats, but they really aren't necessary.

2007-02-06 12:11:35 · answer #1 · answered by sspade30 5 · 0 0

fedest.com, questions and answers