6.3.9 Implementational Alternatives

Instead of using unsigned types for sum and freq, you can consider using signed types. If you do this, you don't need to track the signs of acceleration and velocity separately, and it simplifies comparisons. However, this also means that you need to change the way you compare sum with base_freq, as well as how you reset sum once it exceeds the limits.



Copyright © 2006-02-15 by Tak Auyeung