@tokens-studio/graph-engine
Version:
An execution engine to handle Token Studios generators and resolvers
24 lines • 723 B
JavaScript
import { Node } from '../../programmatic/node.js';
import { NumberSchema } from '../../schemas/index.js';
export default class NodeDefinition extends Node {
static title = 'Tan';
static type = 'studio.tokens.math.tan';
static description = 'Tan node allows you to get the sin of a number.';
constructor(props) {
super(props);
this.addInput('value', {
type: {
...NumberSchema,
default: 0
}
});
this.addOutput('value', {
type: NumberSchema
});
}
execute() {
const value = this.inputs.value.value;
this.outputs.value.set(Math.tan(value));
}
}
//# sourceMappingURL=tan.js.map