re

Function re 

Source
pub fn re<T: Copy + PartialEq + Sub<Output = T>>(r: T) -> c<T>
Expand description

Takes a real and transforms it to a number of type c. Corresponds to the embedding of a real number into a complex.

use complex_algebra::{c, re};
assert_eq!(re(3), c(3, 0))