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.
Source code: Complex32.mjs (L8)
real component, rounded to the nearest f32
imaginary component, rounded to the nearest f32
import { Complex32 } from "wgblas";const z = new Complex32(1, 2); // 1 + 2iconsole.log(z.re, z.im); // 1 2 Copy
import { Complex32 } from "wgblas";const z = new Complex32(1, 2); // 1 + 2iconsole.log(z.re, z.im); // 1 2
Imaginary component (f32-rounded via Math.fround).
Math.fround
Real component (f32-rounded via Math.fround).
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.
See
Source code: Complex32.mjs (L8)