• Calculates WGSL frexp

    Splits val into a fraction and an exponent so that val = fraction * 2 ^ exponent. The fraction is 0.0 or its magnitude is in the range [0.5, 1.0).

    Parameters

    • val: number

      the float to split

    • trait: "f32" | "f16" | "f64"

      the float type, f32 or f16 or f64

    Returns {
        exp: number;
        fract: number;
    }

    the results of splitting val

    • exp: number
    • fract: number

Generated using TypeDoc