complex.from_polar
fn from_polar(mag: F, arg: F) -> T;Args
Returns
Examples
use orion::numbers::complex_number::{complex_trait::ComplexTrait, complex64::complex64};
use orion::numbers::{FP64x64, FP64x64Impl, FixedTrait};
fn from_polar_complex64_example() -> complex64 {
let mag: FP64x64 = FixedTrait::new(778268985067028086784, false); // 42.190046219457976
let arg: FP64x64 = FixedTrait::new(27224496882576083824, false); //1.4758446204521403
ComplexTrait::from_polar(mag,arg)
}
>>> {real: {mag: 73787936714814843012, sign: false}, im: {mag: 774759489569697723777, sign: false}} // 4 + 42 iLast updated