Files
TUM-Formelsammlungen/src/lib/common_rewrite.typ
alexander 72e31ef355
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 22s
Added alot of linAlg
2026-02-01 23:56:11 +01:00

71 lines
1.8 KiB
Typst

#let bgBlock(body, fill: color, width: 100%) = block(body, fill:fill.lighten(80%), width: width, inset: (bottom: 2mm))
#let SeperatorLine = line(length: 100%, stroke: (paint: black, thickness: 0.3mm))
#let MathAlignLeft(e) = {
align(left, block(e))
}
#let subHeading(body, fill: color) = {
box(
align(
top+center,
text(
body,
size: 8pt,
weight: "bold",
style: "italic",
)
),
fill: fill,
width: 100%,
inset: 1mm,
height: auto
)
}
#let MathAlignLeft(e) = {
align(left, block(e))
}
#let tableFillHigh = white
#let tableFillLow = color.lighten(gray, 50%)
#let sinTable = [
#let data = json("../sintable.json")
#table(
columns: data.len(),
rows: data.keys().len(),
stroke: none,
table.hline(stroke: (thickness: 0.3mm)),
fill: (x, y) => if (calc.rem(y, 2) == 0) { tableFillLow } else { tableFillHigh },
table.vline(),
..for (i, label) in data.keys().enumerate() {
([*#eval(label, mode: "math")*], if i > 0 { table.vline() } else { table.vline(stroke: none) })
},
table.hline(stroke: (thickness: 0.3mm)),
..for (i, v) in data.at("x").enumerate() {
for (col) in data.keys() {
(eval(data.at(col).at(i), mode: "math"),)
}
},
table.hline(stroke: (thickness: 0.3mm)),
)
]
#let ComplexNumbersSection(i: $i$) = [
$1/#i = #i^(-1) = -#i quad quad #i^2=-1 quad quad sqrt(#i) = 1/sqrt(2) + 1/sqrt(2)#i$
$z in CC = a + b #i quad quad quad z = r dot e^(phi #i)$ \
$z_0 + z_1 = (a_0 + a_1) + (b_0 + b_1) #i$\
$z_0 dot z_1 = (a_1 a_2 - b_1 b_2) + #i (a_1b_2 + a_2 b_1) = r_0 r_1 e^(#i (phi_0 + phi_1))$\
$z^x = r^x dot e^(phi #i dot x) quad x in RR$ \
$z_0/z_1 = r_0/r_1 e^(#i (phi_0 - phi_1)) quad quad quad$
$r = abs(z) quad phi = cases(
+ arccos(a/r) space : space b >= 0,
- arccos(a/r) space : space b < 0,
)$
]