Skip to content

Commit

Permalink
feat(vectors): add not() bvec op
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Aug 9, 2020
1 parent 94af731 commit a820b8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/vectors/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
11 changes: 11 additions & 0 deletions packages/vectors/src/not.ts
Original file line number Diff line number Diff line change
@@ -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<MultiBVecOpV, BVecOpV>(
([o, a]) => `${o}=!${a};`,
ARGS_V,
ARGS_V,
"o",
1,
NEW_OUT
);

0 comments on commit a820b8f

Please sign in to comment.