Calculate required length once and reuse

AfoHT
Jan 21, 2024, 6:22 PM
Q7IWKL57OWTZL2FQVVC6WH7DCYQYXOLEBFZIZFSRBK7A6K4ZGZDAC

Dependencies

  • [2] MUDVRIBF Fix comparision error
  • [3] JPTYS433 Cleanup, clippy
  • [4] CT3VONTO Introduce PLANKMIN and work with the neverending rows
  • [5] C5VVJ5SO Print how many rows
  • [6] MLUGR2LL Add default impl and some basic plank logic
  • [7] ZJPL7VNQ Separate planks from main
  • [*] 5TH3AA46 10 mm extra space

Change contents

  • replacement in src/bin/main.rs at line 112
    [3.4040][3.4040:4041]()
    [3.4040]
    [3.412]
    let required_length = ROOMLENGTH - row.get_coverage();
  • replacement in src/bin/main.rs at line 114
    [3.443][2.0:70]()
    length if length > (ROOMLENGTH - row.get_coverage()) => {
    [3.443]
    [3.513]
    length if length > (required_length) => {
  • replacement in src/bin/main.rs at line 116
    [3.556][3.556:654]()
    let (plankpart, leftover) = plank.cut_to_length(ROOMLENGTH - row.get_coverage());
    [3.556]
    [3.1796]
    let (plankpart, leftover) = plank.cut_to_length(required_length);
  • replacement in src/bin/main.rs at line 125
    [3.977][3.977:1048]()
    length if length == (ROOMLENGTH - row.get_coverage()) => {
    [3.977]
    [3.1048]
    length if length == (required_length) => {