fixed a bug where negative degree is not converted to positive

Note: The inverse tangent (tan−1) can be computed using a common library routine atan2(b, a′) which usually has a range from −π to π radians; color specifications are given in 0 to 360 degrees, so some adjustment is needed. The inverse tangent is indeterminate if both a′ and b are zero (which also means that the corresponding C′ is zero); in that case, set the hue angle to zero. See Sharma 2005, eqn. 7. (via wikipedia)
added some new test cases