Skip to content

Commit 54518be

Browse files
fix: Add missing Math.tanh support and test
1 parent 9286f56 commit 54518be

File tree

8 files changed

+19
-12
lines changed

8 files changed

+19
-12
lines changed

dist/gpu-browser-core.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* GPU Accelerated JavaScript
66
*
7-
* @version 2.6.9
8-
* @date Sun Feb 16 2020 15:57:16 GMT-0500 (Eastern Standard Time)
7+
* @version 2.6.10
8+
* @date Mon Mar 09 2020 05:45:42 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -2984,6 +2984,7 @@ class FunctionNode {
29842984
'sin',
29852985
'sqrt',
29862986
'tan',
2987+
'tanh'
29872988
];
29882989
return ast.type === 'CallExpression' &&
29892990
ast.callee &&

dist/gpu-browser-core.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gpu-browser.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
* GPU Accelerated JavaScript
66
*
7-
* @version 2.6.9
8-
* @date Sun Feb 16 2020 15:57:16 GMT-0500 (Eastern Standard Time)
7+
* @version 2.6.10
8+
* @date Mon Mar 09 2020 05:45:42 GMT-0400 (Eastern Daylight Time)
99
*
1010
* @license MIT
1111
* The MIT License
@@ -7418,6 +7418,7 @@ class FunctionNode {
74187418
'sin',
74197419
'sqrt',
74207420
'tan',
7421+
'tanh'
74217422
];
74227423
return ast.type === 'CallExpression' &&
74237424
ast.callee &&

dist/gpu-browser.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gpu.js",
3-
"version": "2.6.9",
3+
"version": "2.6.10",
44
"description": "GPU Accelerated JavaScript",
55
"engines": {
66
"node": ">=8.0.0"

src/backend/function-node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,7 @@ class FunctionNode {
623623
'sin',
624624
'sqrt',
625625
'tan',
626+
'tanh'
626627
];
627628
return ast.type === 'CallExpression' &&
628629
ast.callee &&

test/internal/backend/web-gl/function-node/firstAvailableTypeFromAst.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,7 @@ test('Math.sqrt(value)', () => {
260260
test('Math.tan(value)', () => {
261261
assert.equal(run('Math.tan(value)', { argumentTypes: ['Number', 'Number', 'Number'] }), 'Number');
262262
});
263+
264+
test('Math.tanh(value)', () => {
265+
assert.equal(run('Math.tanh(value)', { argumentTypes: ['Number', 'Number', 'Number'] }), 'Number');
266+
});

0 commit comments

Comments
 (0)