use crate::*;
pub trait ToCartesian<T> {
fn to_cartesian( &self ) -> Cartesian<T>;
}
pub trait ToPolar<T> {
fn to_polar( &self ) -> Polar<T>;
}
pub trait MixedComplexConversion<T> {
fn mixed_to_complex( number:T ) -> Self;
}
pub trait NewFromCartesian<T>
where Self: MixedComplex
{
fn new_from_cartesian( re:T, im:T ) -> Self;
}
pub trait NewFromPolar<T>
where Self: MixedComplex
{
fn new_from_polar( mag:T, ang:T ) -> Self;
}
pub trait Mag<T>
where Self: MixedComplex
{
fn mag( &self ) -> T;
fn abs( &self ) -> T;
}
pub trait Arg<T>
where Self: MixedComplex
{
fn arg( &self ) -> T;
fn ang( &self ) -> T;
}
pub trait Conj<T>
where Self: MixedComplex
{
fn conj( &self ) -> T;
}