UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

59 lines (58 loc) 1.06 kB
"use strict"; import { NamedFunction1 } from "./_Base"; export class andArrays extends NamedFunction1 { static type() { return "andArrays"; } func(arrays) { for (let array of arrays) { for (let element of array) { if (!element) { return false; } } } return true; } } export class andBooleans extends NamedFunction1 { static type() { return "andBooleans"; } func(arrays) { for (let element of arrays) { if (!element) { return false; } } return true; } } export class orArrays extends NamedFunction1 { static type() { return "orArrays"; } func(arrays) { for (let array of arrays) { for (let element of array) { if (element) { return true; } } } return false; } } export class orBooleans extends NamedFunction1 { static type() { return "orBooleans"; } func(arrays) { for (let element of arrays) { if (element) { return true; } } return false; } }