Skip to content

Commit

Permalink
Merge pull request #116 from nkint/patch-1
Browse files Browse the repository at this point in the history
Add atan signature with two input
  • Loading branch information
postspectacular authored Aug 7, 2019
2 parents f8decf8 + d97dd08 commit be94f59
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/shader-ast/src/builtins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,17 @@ export const sin = primOp1("sin");
export const tan = primOp1("tan");
export const acos = primOp1("acos");
export const asin = primOp1("asin");
export const atan = primOp1("atan");

export function atan<T extends Prim>(a: Term<T>): FnCall<T>;
export function atan<A extends Prim, B extends A>(
a: Term<A>,
b: Term<B>
): FnCall<A>;
export function atan(a:Term<any>, b?: Term<any>) {
return b
? builtinCall("atan", a.type, a, b)
: builtinCall("atan", a.type, a);
}

export const pow = primOp2("pow");
export const exp = primOp1("exp");
Expand Down

0 comments on commit be94f59

Please sign in to comment.