graetz23 / JWave

A Discrete Fourier Transform (DFT), a Fast Wavelet Transform (FWT), and a Wavelet Packet Transform (WPT) algorithm in 1-D, 2-D, and 3-D using normalized orthogonal (orthonormal) Haar, Coiflet, Daubechie, Legendre and normalized biorthognal wavelets in Java.
http://en.wikipedia.org/wiki/Wavelet
Other
215 stars 73 forks source link

#23 Power of 2 test refactor and unit test. #25

Closed dmcreyno closed 2 years ago

dmcreyno commented 3 years ago

made changes to the MathTools isBinary method and added a unit test. Unit test was needed do to the number of wrong answers on the internet. I would be concerned mostly about testing 0 and 1. I did not include a special case for negative numbers. But, if programmers are asking if a negative number is a power of two, then maybe they have larger issues???