Menu

Sine and Cosine of word variables

MBB
2014-11-03
2014-11-04
  • MBB

    MBB - 2014-11-03

    I've been using the trig3places.h include file to compute Sjne and Cosine values. It works great.
    The Help file says that the 'X' in cosX and Sinx should be integers.

    Recently I had to compute the sine and cosines of values greater 32767 so I dimensioned X as a word variable and trig3places.h seemed to work.

    Does anyone know if there is some upper limit on the value of X? Can it be any word or long Variable?
    I realize with word or long variables, negative angles can't be computed.

    If Sine and Cosine work with word and/or long variables it would nice if the Help File was updated to reflect this.

     
  • Anobium

    Anobium - 2014-11-04

    I have reviewed the code.

    Looking at the code again. The functions accept and return integers.

    Review your results and if all is OK then press on. :-)

     

Log in to post a comment.