TUM-Thesis/pseudocode/offsets.typ
2024-08-02 19:11:12 +02:00

16 lines
430 B
Typst

#import "@preview/lovelace:0.3.0": *
#pseudocode-list(booktabs: true, numbered-title: [Find all offsets $phi$])[
+ *input* $Phi, S$
+ *list* offsets $phi$
+ *if* $S$ is odd
+ $S = s-1$
+ *append* 0 *to list* offsets
+ *while* $i <= S/2$
+ *append* $+(i dot Phi)$ *to list* offsets
+ *append* $- (i dot Phi)$ *to list* offsets
+ *sort list* offsets in ascending order
+ *return* offsets
+ *end*
]