home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / SNIP9404.ZIP / WINDCHIL.C < prev    next >
C/C++ Source or Header  |  1994-04-03  |  523b  |  20 lines

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