wgblas
    Preparing search index...

    Class Complex32

    A single 32-bit (f32) complex number: a real and an imaginary component. JavaScript has no native complex number type, so this is the value type every complex routine in this library builds on.

    Index
    • Parameters

      • re: number

        real component, rounded to the nearest f32

      • im: number

        imaginary component, rounded to the nearest f32

        import { Complex32 } from "wgblas";

        const z = new Complex32(1, 2); // 1 + 2i
        console.log(z.re, z.im); // 1 2

      Returns Complex32

    im: number

    Imaginary component (f32-rounded via Math.fround).

    re: number

    Real component (f32-rounded via Math.fround).