home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / WINDCHIL.C < prev    next >
C/C++ Source or Header  |  1997-07-05  |  590b  |  23 lines

  1. /* +++Date last modified: 05-Jul-1997 */
  2.  
  3. /*
  4. **  Wind Chill for exposed human skin, expressed as a function of wind
  5. **  speed in Miles per Hour and temperature in degrees Fahrenheit.
  6. **
  7. **  Public domain from numerous published references.
  8. */
  9.  
  10. #include <math.h>
  11. #include "windchil.h"
  12.  
  13. double wind_chill(int wind_speed, int temp)
  14. {
  15.       if (4 > wind_speed)
  16.             return (double)temp;
  17.       else
  18.       {
  19.             return (((10.45 + (6.686112 * sqrt((double) wind_speed))
  20.                   - (.447041 * wind_speed)) / 22.034 * (temp - 91.4)) + 91.4);
  21.       }
  22. }
  23.