asType<R extends num, I extends num> method
casting the Complex to specific type
Implementation
@override
Complex<R, I> asType<R extends num, I extends num>() {
final R r;
final I i;
if (R == T) {
r = real as R;
} else {
var temp = real is double && R != double ? real.toInt() : real;
r = _typeParsing<R>('$temp')!;
}
if (I == E) {
i = imaginary as I;
} else {
var temp = imaginary is double && R != double ? imaginary.toInt() : real;
i = _typeParsing<I>('$temp')!;
}
return Complex<R, I>(r, i);
}