shared/types/
complex.rs

1
2
3
4
5
6
7
8
9
10
11
12
use serde::{Deserialize, Serialize};

/// A `Complex` number with real (`re`) and imaginary (`im`) parts.
///
/// # Attributes
/// * `re` - The real part of the complex number, represented as a `f64`.
/// * `im` - The imaginary part of the complex number, also a `f64`.
#[derive(Debug, Clone, PartialEq, Copy, Serialize, Deserialize)]
pub struct Complex {
    pub re: f64,
    pub im: f64,
}