further work on translation

This commit is contained in:
2026-03-02 14:43:14 +01:00
parent 457873a31b
commit c6609d15f5
12 changed files with 254 additions and 110 deletions

View File

@@ -2,7 +2,7 @@
engine: julia
---
# A Case Study: The Parametric Data Type PComplex
# Example: The Parametric Data Type `PComplex`
```{julia}
#| error: false
@@ -109,9 +109,19 @@ z2 = PComplex(2.0, 0.3)
Julia uses `//` as an infix constructor for the type `Rational`. We want something equally nice.
In electronics/electrical engineering, [AC quantities are described by complex numbers.](https://en.wikipedia.org/wiki/Phasor_analysis) A representation of complex numbers by "magnitude" and "phase" is common and is often represented in so-called [phasor form](https://en.wikipedia.org/wiki/Phasor):
:::{.content-visible unless-format="typst"}
$$
z= r\enclose{phasorangle}{\phi} = 3.4\;\enclose{phasorangle}{45^\circ}
$$
:::
:::{.content-hidden unless-format="typst"}
```{=typst}
$ z = r angle.acute phi = 3.4 angle.acute 45 degree $
```
:::
where the angle is usually noted in degrees.
:::{.callout-note .titlenormal collapse="true"}