any
On this page

any

Function

Whether any component of a vector of bools is true: any(a < b).

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

Syntax

declare function any(a0: bool): bool
declare function any<V extends vec2b | vec3b | vec4b>(a0: V): (bool)
declare function any(v: bool | BoolVec): bool
declare function any<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, any(xs, (x) => ...) is the fold.

Targets

WGSL
any(a)
GLSL ES 3.00
any(a)

Examples

See also

Edit this page Report a problem