home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / sphinx / trig.h__ < prev    next >
Text File  |  1993-04-14  |  4KB  |  61 lines

  1. /* 
  2.     SPHINX Programming (C) 1993.
  3.     NAME:  TRIG.H-- 
  4.     DESCRIPTION:  This file provides sin and cos values stored as integers.
  5.                   Each integer value is actually the sin or cos value 
  6.                   multiplied by 128.  This may be useful for someone.
  7. */
  8.  
  9. int sin[360] = { 
  10.         0,2,4,7,9,11,13,16,18,20,22,24,27,29,31,33,
  11.         35,37,40,42,44,46,48,50,52,54,56,58,60,62,64,66,
  12.         68,70,72,73,75,77,79,81,82,84,86,87,89,91,92,94,
  13.         95,97,98,99,101,102,104,105,106,107,109,110,111,112,113,114,
  14.         115,116,117,118,119,119,120,121,122,122,123,124,124,125,125,126,
  15.         126,126,127,127,127,128,128,128,128,128,128,128,128,128,128,128,
  16.         127,127,127,126,126,126,125,125,124,124,123,122,122,121,120,119,
  17.         119,118,117,116,115,114,113,112,111,110,109,107,106,105,104,102,
  18.         101,99,98,97,95,94,92,91,89,87,86,84,82,81,79,77,
  19.         75,73,72,70,68,66,64,62,60,58,56,54,52,50,48,46,
  20.         44,42,40,37,35,33,31,29,27,24,22,20,18,16,13,11,
  21.         9,7,4,2,0,-2,-4,-7,-9,-11,-13,-16,-18,-20,-22,-24,
  22.         -27,-29,-31,-33,-35,-37,-40,-42,-44,-46,-48,-50,-52,-54,-56,-58,
  23.         -60,-62,-64,-66,-68,-70,-72,-73,-75,-77,-79,-81,-82,-84,-86,-87,
  24.         -89,-91,-92,-94,-95,-97,-98,-99,-101,-102,-104,-105,-106,-107,-109,-110,
  25.         -111,-112,-113,-114,-115,-116,-117,-118,-119,-119,-120,-121,-122,-122,-123,-124,
  26.         -124,-125,-125,-126,-126,-126,-127,-127,-127,-128,-128,-128,-128,-128,-128,-128,
  27.         -128,-128,-128,-128,-127,-127,-127,-126,-126,-126,-125,-125,-124,-124,-123,-122,
  28.         -122,-121,-120,-119,-119,-118,-117,-116,-115,-114,-113,-112,-111,-110,-109,-107,
  29.         -106,-105,-104,-102,-101,-99,-98,-97,-95,-94,-92,-91,-89,-87,-86,-84,
  30.         -82,-81,-79,-77,-75,-73,-72,-70,-68,-66,-64,-62,-60,-58,-56,-54,
  31.         -52,-50,-48,-46,-44,-42,-40,-37,-35,-33,-31,-29,-27,-24,-22,-20,
  32.         -18,-16,-13,-11,-9,-7,-4,-2};
  33.  
  34.  
  35. int cos[360] = { 
  36.         128,128,128,128,128,128,127,127,127,126,126,126,125,125,124,124,
  37.         123,122,122,121,120,119,119,118,117,116,115,114,113,112,111,110,
  38.         109,107,106,105,104,102,101,99,98,97,95,94,92,91,89,87,
  39.         86,84,82,81,79,77,75,73,72,70,68,66,64,62,60,58,
  40.         56,54,52,50,48,46,44,42,40,37,35,33,31,29,27,24,
  41.         22,20,18,16,13,11,9,7,4,2,0,-2,-4,-7,-9,-11,
  42.         -13,-16,-18,-20,-22,-24,-27,-29,-31,-33,-35,-37,-40,-42,-44,-46,
  43.         -48,-50,-52,-54,-56,-58,-60,-62,-64,-66,-68,-70,-72,-73,-75,-77,
  44.         -79,-81,-82,-84,-86,-87,-89,-91,-92,-94,-95,-97,-98,-99,-101,-102,
  45.         -104,-105,-106,-107,-109,-110,-111,-112,-113,-114,-115,-116,-117,-118,-119,-119,
  46.         -120,-121,-122,-122,-123,-124,-124,-125,-125,-126,-126,-126,-127,-127,-127,-128,
  47.         -128,-128,-128,-128,-128,-128,-128,-128,-128,-128,-127,-127,-127,-126,-126,-126,
  48.         -125,-125,-124,-124,-123,-122,-122,-121,-120,-119,-119,-118,-117,-116,-115,-114,
  49.         -113,-112,-111,-110,-109,-107,-106,-105,-104,-102,-101,-99,-98,-97,-95,-94,
  50.         -92,-91,-89,-87,-86,-84,-82,-81,-79,-77,-75,-73,-72,-70,-68,-66,
  51.         -64,-62,-60,-58,-56,-54,-52,-50,-48,-46,-44,-42,-40,-37,-35,-33,
  52.         -31,-29,-27,-24,-22,-20,-18,-16,-13,-11,-9,-7,-4,-2,0,2,
  53.         4,7,9,11,13,16,18,20,22,24,27,29,31,33,35,37,
  54.         40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,
  55.         72,73,75,77,79,81,82,84,86,87,89,91,92,94,95,97,
  56.         98,99,101,102,104,105,106,107,109,110,111,112,113,114,115,116,
  57.         117,118,119,119,120,121,122,122,123,124,124,125,125,126,126,126,
  58.         127,127,127,128,128,128,128,128};
  59.  
  60.  
  61. /* end of TRIG.H-- */