🔬
Docs
  • 👋Vision lines from CEO
  • 📖Documentation
    • Getting Started
      • Introduction
      • Setting Up an Account
      • User Interface
        • Account
        • Project Manager
        • Diagram Editor
          • Main Canvas
            • Nodanomics Menu
            • Node Toolbox
            • Control Bar
            • Function Buttons
              • Node Explorer
            • Node Properties Drawer
          • Execution Graph
      • Creating Projects
        • Creating Diagrams
    • Nodes
      • Overview
      • Connections
      • Data-type Nodes
        • Data
        • Origin
        • Sink
        • Dataset
      • Logic-type Nodes
        • Formula
        • Loop
      • Event-type Nodes
        • Event Trigger
        • Event Listener
    • Tutorials
      • First diagram creation
      • Import existing diagram
      • Examples
        • Gatcha System
  • Use Cases
    • 🎯For Web3 Marketing Agencies
  • BUSINESS MODEL
    • 🎮For Blockchain Ecosystems
    • 🎮For Tokenomics Agencies
  • AI Tools
    • Tokenomics Architect
    • Step-by-step manual guideline
Powered by GitBook
On this page
  • Internal Functions
  • Advanced Uses
  • If-statements
  1. Documentation
  2. Nodes
  3. Logic-type Nodes

Formula

PreviousLogic-type NodesNextLoop

Last updated 1 year ago

This node is responsible for calculating mathematical expressions.

The inputs can either be dynamic, as logic connections attached to the node or constants, present in the expression itself. The inputs can also be the value from other components using the tag notation system. The diagram designer can assign as many dynamic variables as needed to be used.

Internal Functions

The most common methods are:

  • equal(a, b)

  • smaller(a, b), smallerEq(a, b), larger(a, b), largerEq(a, b)

  • not(a)

  • sqrt(a)

Some names are reserved to the math.js function. That means, if you name a node the same as one of the math.js' methods or properties, the logic won't work.

Advanced Uses

If-statements

Alongside with the Chain Connection's condition field, the Formula node can be a powerful tool to calculate if expressions.

The Formula Node can use methods and properties from the library.

To use any of the methods or properties from the library, all you need is to use the function name (without the 'math.') from the math.js .

📖
math.js
reference
Image 1. The Formula Node.
Image 2. Example of usage of math.js functions.