not
constnot:DualFn<{(value):boolean; (value):boolean; <T>(value):VecInstanceToBooleanVecInstance<T>; (value):boolean; }>
Defined in: packages/typegpu/src/std/boolean.ts:216
Returns the logical negation of the given value.
For scalars (bool, number), returns !value.
For boolean vectors, returns component-wise !value.
For numeric vectors, returns a boolean vector with component-wise truthiness negation.
For all other types, returns the truthiness negation (in WGSL, this applies only if the value is known at compile-time).
Example
Section titled βExampleβnot(true) // returns falsenot(-1) // returns falsenot(0) // returns truenot(vec3b(true, true, false)) // returns vec3b(false, false, true)not(vec3f(1.0, 0.0, -1.0)) // returns vec3b(false, true, false)not({a: 1882}) // returns falsenot(NaN) // returns false **as in WGSL**