MCPcopy Index your code
hub / github.com/gpujs/gpu.js / isAstMathVariable

Method isAstMathVariable

src/backend/function-node.js:594–611  ·  view source on GitHub ↗
(ast)

Source from the content-addressed store, hash-verified

592 }
593
594 isAstMathVariable(ast) {
595 const mathProperties = [
596 'E',
597 'PI',
598 'SQRT2',
599 'SQRT1_2',
600 'LN2',
601 'LN10',
602 'LOG2E',
603 'LOG10E',
604 ];
605 return ast.type === 'MemberExpression' &&
606 ast.object && ast.object.type === 'Identifier' &&
607 ast.object.name === 'Math' &&
608 ast.property &&
609 ast.property.type === 'Identifier' &&
610 mathProperties.indexOf(ast.property.name) > -1;
611 }
612
613 isAstMathFunction(ast) {
614 const mathFunctions = [

Callers 2

getTypeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected