Skip to content

Commit

Permalink
feat(matrices): add matXXn & matXXv fns
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jun 15, 2019
1 parent 114003c commit 7a2ef82
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/matrices/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export * from "./m23-m22";
export * from "./m23-m44";
export * from "./m33-m44";
export * from "./m44-m33";
export * from "./matn";
export * from "./matv";
export * from "./mixq";
export * from "./mul";
export * from "./mulm";
Expand Down
15 changes: 15 additions & 0 deletions packages/matrices/src/matn.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Mat } from "./api";
import {
scale22,
scale23,
scale33,
scale44
} from "./scale";

export const mat2n = (out: Mat | null, n: number) => scale22(out, n);

export const mat23n = (out: Mat | null, n: number) => scale23(out, n);

export const mat3n = (out: Mat | null, n: number) => scale33(out, n);

export const mat4n = (out: Mat | null, n: number) => scale44(out, n);
14 changes: 14 additions & 0 deletions packages/matrices/src/matv.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import {
setVV16,
setVV4,
setVV6,
setVV9
} from "@thi.ng/vectors";

export const mat2v = setVV4;

export const mat23v = setVV6;

export const mat33v = setVV9;

export const mat44v = setVV16;

0 comments on commit 7a2ef82

Please sign in to comment.