From a820b8fec8f69c82910f61bfeb3c013ceed19b8c Mon Sep 17 00:00:00 2001 From: Karsten Schmidt Date: Mon, 10 Aug 2020 00:59:16 +0100 Subject: [PATCH] feat(vectors): add not() bvec op --- packages/vectors/src/index.ts | 1 + packages/vectors/src/not.ts | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 packages/vectors/src/not.ts diff --git a/packages/vectors/src/index.ts b/packages/vectors/src/index.ts index 4cac3d2cf8..11de110a3e 100644 --- a/packages/vectors/src/index.ts +++ b/packages/vectors/src/index.ts @@ -124,6 +124,7 @@ export * from "./neg"; export * from "./normal"; export * from "./normalize"; export * from "./normalizes"; +export * from "./not"; export * from "./ortho-normal"; export * from "./perpendicular"; export * from "./polar"; diff --git a/packages/vectors/src/not.ts b/packages/vectors/src/not.ts new file mode 100644 index 0000000000..7aaa7cee22 --- /dev/null +++ b/packages/vectors/src/not.ts @@ -0,0 +1,11 @@ +import { BVecOpV, MultiBVecOpV } from "./api"; +import { ARGS_V, defOp, NEW_OUT } from "./internal/codegen"; + +export const [not, not2, not3, not4] = defOp( + ([o, a]) => `${o}=!${a};`, + ARGS_V, + ARGS_V, + "o", + 1, + NEW_OUT +);