You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
334B

  1. #include "FreqToRate.h"
  2. void FreqToRate::setinput(float _input)
  3. {
  4. input = _input;
  5. }
  6. void FreqToRate::setsampleRate(float _base)
  7. {
  8. base = _base;
  9. }
  10. void FreqToRate::settableLength(float _length)
  11. {
  12. tableLength = _length;
  13. }
  14. float FreqToRate::getoutput()
  15. {
  16. float output = input / base * tableLength;
  17. return output;
  18. }