dsp-collection
Version:
A collection of JavaScript modules for digital signal processing (written in TypeScript)
43 lines • 1.33 kB
TypeScript
export default class Complex {
static readonly I: Complex;
static readonly ZERO: Complex;
static readonly ONE: Complex;
static readonly TWO: Complex;
static readonly NaN: Complex;
static readonly INFINITY: Complex;
readonly re: number;
readonly im: number;
constructor(re: number, im?: number);
toString(): string;
toNumber(eps: number): number;
isNaN(): boolean;
isInfinite(): boolean;
isFinite(): boolean;
equals(x: Complex): boolean;
fuzzyEquals(x: Complex, eps: number): boolean;
static expj(arg: number): Complex;
static fromPolar(abs: number, arg: number): Complex;
abs(): number;
arg(): number;
conj(): Complex;
neg(): Complex;
reciprocal(): Complex;
exp(): Complex;
log(): Complex;
sqr(): Complex;
sqrt(): Complex;
addReal(x: number): Complex;
add(x: Complex): Complex;
subReal(x: number): Complex;
static subFromReal(x: number, y: Complex): Complex;
sub(x: Complex): Complex;
mulReal(x: number): Complex;
mul(x: Complex): Complex;
divReal(x: number): Complex;
div(x: Complex): Complex;
static divFromReal(x: number, y: Complex): Complex;
powInt(x: number): Complex;
powReal(x: number): Complex;
pow(x: Complex): Complex;
}
//# sourceMappingURL=Complex.d.ts.map