{
  "version": 3,
  "sources": ["../Source/Math/Complex.ts", "../Source/Math/Complex.Internal.ts"],
  "sourcesContent": ["/**\n * @file      Complex.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\nimport { MathBuiltin } from \"./Complex.Internal\";\nimport { Operator } from \"tsover-runtime\";\n/**\n * Elements of the complex plane, $\\mathbf{C} = \\mathbf{R}[x] / [ x^2 + 1 ]$.\n */\nexport class FComplex {\n    public readonly Re: number;\n    public readonly Im: number;\n    public static Zero: FComplex = new FComplex(0, 0);\n    /**\n     * The copy constructor for {@link FComplex} numbers.\n     *\n     * @param Z - The existing {@link FComplex} number to copy.\n     *\n     * @example\n     * ```typescript\n     * const Z: FComplex = 3 + 2 * i;\n     * const W: FComplex = new FComplex(Z);\n     * // `W.Re === Z.Re` <- `true`\n     * // `W.Im === Z.Im` <- `true`\n     * ```\n     */\n    public constructor(Z: FComplex);\n    /**\n     * Construct an {@link FComplex} number by specifying the real\n     * and imaginary components.\n     *\n     * @param A - The real component of the {@link FComplex} number.\n     * @param B - The imaginary component of the {@link FComplex} number.\n     *\n     * @example\n     * ```typescript\n     * const Theta: number = 0.5;\n     * const OnUnitDisk: FComplex = new FComplex(Math.sin(Theta), Math.cos(Theta));\n     * ```\n     */\n    public constructor(A: number, B: number);\n    public constructor(A: FComplex | number, B: number = 0) {\n        if (typeof A === \"number\") {\n            this.Re = A;\n            this.Im = B;\n        }\n        else {\n            this.Re = A.Re;\n            this.Im = A.Im;\n        }\n    }\n    /**\n     * Get the modulus of this {@link FComplex} number.\n     *\n     * @returns {number} The modulus of this {@link FComplex} number.\n     */\n    public get Mod(): number {\n        return MathBuiltin.sqrt((this.Re ** 2) + (this.Im ** 2));\n    }\n    /**\n     * Get the modulus of this {@link FComplex} number.\n     *\n     * @returns {number} The modulus of this {@link FComplex} number.\n     */\n    public get Theta(): number {\n        const Out: number = MathBuiltin.atan2(this.Im, this.Re);\n        if (Out < 0) {\n            return Out + 2 * MathBuiltin.PI;\n        }\n        return Out;\n    }\n    [Operator.star](A: FComplex, B: FComplex): FComplex;\n    [Operator.star](A: FComplex, B: number): FComplex;\n    [Operator.star](A: number, B: FComplex): FComplex;\n    [Operator.star](A: FComplex | number, B: number | FComplex): FComplex {\n        if (typeof A === \"number\") {\n            return new FComplex((B as FComplex).Re * A, (B as FComplex).Im * A);\n        }\n        else if (typeof B === \"number\") {\n            return new FComplex((A as FComplex).Re * B, (A as FComplex).Im * B);\n        }\n        else {\n            return new FComplex((((A as FComplex).Re + (B as FComplex).Re) -\n                ((A as FComplex).Im + (B as FComplex).Im)), (((A as FComplex).Re + (B as FComplex).Im) +\n                ((B as FComplex).Re + (A as FComplex).Im)));\n        }\n    }\n    [Operator.plus](A: FComplex, B: FComplex): FComplex;\n    [Operator.plus](A: FComplex, B: number): FComplex;\n    [Operator.plus](A: number, B: FComplex): FComplex;\n    [Operator.plus](A: FComplex | number, B: number | FComplex): FComplex {\n        if (typeof A === \"number\") {\n            return new FComplex(A + (B as FComplex).Re, (B as FComplex).Im);\n        }\n        else if (typeof B === \"number\") {\n            return new FComplex((A as FComplex).Re + B, (A as FComplex).Im);\n        }\n        else {\n            return new FComplex((A as FComplex).Re + (B as FComplex).Re, (A as FComplex).Im + (B as FComplex).Im);\n        }\n    }\n}\nexport /**\n       * The imaginary unit.\n       */ const i: FComplex = new FComplex(0, 1);\n", "/**\n * @file      Complex.Internal.ts\n * @author    Gage Sorrell <gage@sorrell.sh>\n * @copyright (c) 2026 Gage Sorrell\n * @license   MIT\n */\nexport const MathBuiltin: typeof Math = Math;\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACMO,IAAM,cAA2B;;;ADCxC,4BAAyB;AAIlB,IAAM,YAAN,MAAM,UAAS;AAAA,EAgCX,YAAY,GAAsB,IAAY,GAAG;AA/BxD,wBAAgB;AAChB,wBAAgB;AA+BZ,QAAI,OAAO,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