to_cartesian

Function to_cartesian 

Source
pub fn to_cartesian<T>(a: Polar<T>) -> Cartesian<T>
Expand description

Cast cartesian complex fixed point number to polar form.

§Arguments

  • a - The number transform.

§Example

use mixed_num::Polar;
use mixed_num::complex::*;
 
let mut x = Polar::new(1f32, 0f32);
assert_eq!{ to_cartesian(x).to_string(), "1+0i" };