WasmGPU.math.vec3.ang¶
Summary¶
WasmGPU.math.vec3.ang computes component-wise angular representation of a vector. Use it for directional diagnostics or angle-based post-processing.
Syntax¶
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
v |
number[] |
Yes | Vector input as [x, y, z]. |
Returns¶
number[] - Vector of component angles derived from the input.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const v = [1, 2, 3];
const result = wgpu.math.vec3.ang(v);
console.log(result);