all
On this page

all

Function

Whether every component of a vector of bools is true: all(a === b).

The signature and the sentence under each name are the compiler's own text at commit 26de7be8.

Syntax

declare function all(a0: bool): bool
declare function all<V extends vec2b | vec3b | vec4b>(a0: V): (bool)
declare function all(v: bool | BoolVec): bool
declare function all<T>(xs: array<T>, pred: (x: T) => bool): bool

A signature may name a type the ambient file declares for its own use. These are those declarations.

BoolVec
type BoolVec = vec2b | vec3b | vec4b

Parameters

Return value

bool(bool)

Description

A scalar bool passes through. Over an array, all(xs, (x) => ...) is the fold.

Targets

WGSL
all(a)
GLSL ES 3.00
all(a)

Examples

See also

Edit this page Report a problem