Skip to content

Commit 4b91861

Browse files
committed
Adjustments-to-colormath-Library
Order of operation tweaks to colormath library.
1 parent 91c8f28 commit 4b91861

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed
-4 Bytes
Binary file not shown.

Learn/Simple Libraries/Utility/libcolormath/compareRRGGBB.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
int compareRRGGBB(int c1, int c2)
2020
{
21-
return 255 - ((abs((c1 & 0xFF0000) >> 16 - (c2 & 0xFF0000) >> 16) + abs((c1 & 0xFF00) >> 8 - (c2 & 0xFF00) >> 8) + abs(c1 & 0xFF - c2 & 0xFF)) / 3);
21+
return 255 - ((abs(((c1 & 0xFF0000) >> 16) - ((c2 & 0xFF0000) >> 16)) + abs(((c1 & 0xFF00) >> 8) - ((c2 & 0xFF00) >> 8)) + abs((c1 & 0xFF) - (c2 & 0xFF))) / 3);
2222
}
2323

2424

Learn/Simple Libraries/Utility/libcolormath/libcolormath.side

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ get8bitColor.c
55
getColorRRGGBB.c
66
remapColor.c
77
>compiler=C
8-
>memtype=lmm main ram
8+
>memtype=cmm main ram compact
99
>optimize=-Os
1010
>-m32bit-doubles
1111
>-fno-exceptions
-160 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)