cross
On this page

cross()

Function in Builtins

cross(a, b): 3-D cross product of two vec3<f32> values.

import { cross } from 'typeshade/core/ir'

This export returns an IR node. A "use typeshade" file calls the builtin itself: cross()

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

Syntax

const cross: (
a: ReadonlyNode<"vec3<f32>">,
b: ReadonlyNode<"vec3<f32>">,
) => Node<"vec3<f32>">

Parameters

a ReadonlyNode<'vec3<f32>'>
b ReadonlyNode<'vec3<f32>'>

Return value

Node<'vec3<f32>'>

Targets

TargetSupportNotes
WGSL (WebGPU) Supported

cross(a, b).

GLSL ES 3.00 (WebGL2) Supported

cross(a, b).

CPU oracle Supported

Evaluated in f64 by the oracle.

See also

Source

src/core/ir/node.ts, line 1626, at commit af54ddad5

Edit this page Report a problem