2 #[allow(non_snake_case)]
14 [TRI as float, NL, NL, NM],
15 [TRI as float, NL, NM, NS],
16 [TRI as float, NM, NS, ZO],
17 [TRI as float, NS, ZO, PS],
18 [TRI as float, ZO, PS, PM],
19 [TRI as float, PS, PM, PL],
20 [TRI as float, PM, PL, PL],
30 [TRI as float, NL, NL, NM],
31 [TRI as float, NL, NM, NS],
32 [TRI as float, NM, NS, ZO],
33 [TRI as float, NS, ZO, PS],
34 [TRI as float, ZO, PS, PM],
35 [TRI as float, PS, PM, PL],
36 [TRI as float, PM, PL, PL],
38 let NL: float = -15.0;
39 let NM: float = -10.0;
46 [NL, NL, NM, NM, NS, ZO, ZO],
47 [NL, NL, NM, NS, NS, ZO, PS],
48 [NM, NM, NM, NS, ZO, PS, PS],
49 [NM, NM, NS, ZO, PS, PM, PM],
50 [NS, NS, ZO, PS, PS, PM, PM],
51 [NS, ZO, PS, PM, PM, PM, PL],
52 [ZO, ZO, PM, PM, PM, PL, PL],
62 [PL, PL, PM, PM, PS, ZO, ZO],
63 [PL, PL, PM, PS, PS, ZO, ZO],
64 [PL, PM, PS, PS, ZO, NS, NS],
65 [PM, PM, PS, ZO, NS, NM, NM],
66 [PM, PS, ZO, NS, NS, NM, NL],
67 [ZO, ZO, NS, NS, NM, NL, NL],
68 [ZO, ZO, NS, NM, NM, NL, NL],
71 [NS, PS, PL, PL, PL, PM, NS],
72 [NS, PS, PL, PM, PM, PS, ZO],
73 [ZO, PS, PM, PM, PS, PS, ZO],
74 [ZO, PS, PS, PS, PS, PS, ZO],
75 [ZO, ZO, ZO, ZO, ZO, ZO, ZO],
76 [NL, NS, NS, NS, NS, NS, NL],
77 [NL, NM, NM, NM, NS, NS, NL],
79 let mut block = [0u8; liba::pid_fuzzy::BLOCK(2)];
80 let mut pid = liba::pid_fuzzy::new();
90 .set_block(&mut block, 2);
91 pid.op(liba::fuzzy::EQU).zero();
92 std::println!("{} {}", pid.pos(1.0, 0.0), pid.pos(1.0, 0.0));
93 pid.op(liba::fuzzy::EQU).zero();
94 std::println!("{} {}", pid.inc(1.0, 0.0), pid.inc(1.0, 0.0));