TUM-Thesis/pseudocode/offsets.typ
2024-07-31 18:46:51 +02:00

16 lines
418 B
Typst

#import "@preview/lovelace:0.3.0": *
#pseudocode-list(booktabs: true, numbered-title: [Find all offsets])[
+ *input* $Phi, S$
+ *list* offsets
+ *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*
]