aboutsummaryrefslogtreecommitdiff
path: root/src/dither.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-04-06 10:24:54 +0100
committerAkshay <[email protected]>2021-04-06 10:24:54 +0100
commitc84c38544bc6e81f0b0482e4e82b6c95848c1a0c (patch)
tree3ae2f3387ba5ef56a7f7c3304dc029ae7845f175 /src/dither.rs
parent3f5b917c6ced370d940774b51ff89cec0d03c562 (diff)
apply clippy lints
Diffstat (limited to 'src/dither.rs')
-rw-r--r--src/dither.rs40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/dither.rs b/src/dither.rs
index 99e2839..25c59c8 100644
--- a/src/dither.rs
+++ b/src/dither.rs
@@ -26,16 +26,16 @@ pub fn bayer(level: u8, pt: MapPoint) -> bool {
26 let MapPoint { x, y } = pt; 26 let MapPoint { x, y } = pt;
27 let r = (x % 4, y % 4); 27 let r = (x % 4, y % 4);
28 match level { 28 match level {
29 01 => r == (0, 0) || bayer(00, pt), 29 1 => r == (0, 0) || bayer(0, pt),
30 02 => r == (2, 2) || bayer(01, pt), 30 2 => r == (2, 2) || bayer(1, pt),
31 03 => r == (0, 2) || bayer(02, pt), 31 3 => r == (0, 2) || bayer(2, pt),
32 04 => r == (2, 0) || bayer(03, pt), 32 4 => r == (2, 0) || bayer(3, pt),
33 05 => r == (1, 1) || bayer(04, pt), 33 5 => r == (1, 1) || bayer(4, pt),
34 06 => r == (3, 3) || bayer(05, pt), 34 6 => r == (3, 3) || bayer(5, pt),
35 07 => r == (1, 3) || bayer(06, pt), 35 7 => r == (1, 3) || bayer(6, pt),
36 08 => r == (3, 1) || bayer(07, pt), 36 8 => r == (3, 1) || bayer(7, pt),
37 09 => r == (0, 1) || bayer(08, pt), 37 9 => r == (0, 1) || bayer(8, pt),
38 10 => r == (0, 3) || bayer(09, pt), 38 10 => r == (0, 3) || bayer(9, pt),
39 11 => r == (2, 3) || bayer(10, pt), 39 11 => r == (2, 3) || bayer(10, pt),
40 12 => r == (2, 1) || bayer(11, pt), 40 12 => r == (2, 1) || bayer(11, pt),
41 13 => r == (1, 0) || bayer(12, pt), 41 13 => r == (1, 0) || bayer(12, pt),
@@ -73,16 +73,16 @@ pub fn rylander(level: u8, pt: MapPoint) -> bool {
73 let MapPoint { x, y } = pt; 73 let MapPoint { x, y } = pt;
74 let r = (x % 4, y % 4); 74 let r = (x % 4, y % 4);
75 match level { 75 match level {
76 01 => r == (1, 3) || rylander(00, pt), 76 1 => r == (1, 3) || rylander(0, pt),
77 02 => r == (3, 1) || rylander(01, pt), 77 2 => r == (3, 1) || rylander(1, pt),
78 03 => r == (3, 3) || rylander(02, pt), 78 3 => r == (3, 3) || rylander(2, pt),
79 04 => r == (1, 1) || rylander(03, pt), 79 4 => r == (1, 1) || rylander(3, pt),
80 05 => r == (1, 2) || rylander(04, pt), 80 5 => r == (1, 2) || rylander(4, pt),
81 06 => r == (3, 0) || rylander(05, pt), 81 6 => r == (3, 0) || rylander(5, pt),
82 07 => r == (3, 2) || rylander(06, pt), 82 7 => r == (3, 2) || rylander(6, pt),
83 08 => r == (1, 0) || rylander(07, pt), 83 8 => r == (1, 0) || rylander(7, pt),
84 09 => r == (0, 3) || rylander(08, pt), 84 9 => r == (0, 3) || rylander(8, pt),
85 10 => r == (2, 1) || rylander(09, pt), 85 10 => r == (2, 1) || rylander(9, pt),
86 11 => r == (2, 3) || rylander(10, pt), 86 11 => r == (2, 3) || rylander(10, pt),
87 12 => r == (0, 1) || rylander(11, pt), 87 12 => r == (0, 1) || rylander(11, pt),
88 13 => r == (0, 2) || rylander(12, pt), 88 13 => r == (0, 2) || rylander(12, pt),