Skip to content

Commit 7244a37

Browse files
Use MathUtils.sanitizeDegreesDouble for hue calculation in Cam16.
1 parent 87b3d00 commit 7244a37

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

lib/src/hct/cam16.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,7 @@ final class Cam16 {
112112
// hue
113113
final atan2 = math.atan2(b, a);
114114
final atanDegrees = MathUtils.toDegrees(atan2);
115-
final hue = atanDegrees < 0
116-
? atanDegrees + 360.0
117-
: atanDegrees >= 360
118-
? atanDegrees - 360.0
119-
: atanDegrees;
115+
final hue = MathUtils.sanitizeDegreesDouble(atanDegrees);
120116
final hueRadians = MathUtils.toRadians(hue);
121117

122118
// achromatic response to color

0 commit comments

Comments
 (0)