1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Internal complex number type mirroring PROJ's `COMPLEX` struct.
//!
//! PROJ declares `typedef struct { double r, i; } COMPLEX;` in
//! `src/proj_internal.h`. This module provides a Pure-Rust equivalent so the
//! ecosystem can avoid the `num-complex` dependency. Only the fields and the
//! constructor required by the ported PROJ algorithms are exposed here;
//! arithmetic is added incrementally by the projection modules that need it.
/// Complex number with real part `r` and imaginary part `i`.
///
/// Mirrors PROJ's `COMPLEX { double r, i; }` (declared in
/// `src/proj_internal.h`).