OMD Documentation

omdConstantNode

Represents a numeric constant in a mathematical expression. This node is a leaf node in the expression tree, meaning it does not have any children.

Class Definition

export class omdConstantNode extends omdLeafNode

Constructor

new omdConstantNode(ast)

Creates a new omdConstantNode instance.

Public Properties

Public Methods

isConstant()

Checks if the node represents a constant value.

evaluate()

Evaluates the constant node. Since it's a constant, it simply returns its value.

toMathJSNode()

Converts the node back into a math.js-compatible AST format.

toString()

Converts the constant node into its string representation.

Internal Methods

↑ Top