Chalkboard - v3.0.4
    Preparing search index...

    Function define

    • Defines a mathematical function in the field of real numbers.

      Parameters

      • ...rule: (((...x: number[]) => number) | ((...x: number[]) => number)[])[]

        The rule(s) of the function

      Returns ChalkboardFunction

      const parabola = Chalkboard.real.define((x) => x * x - 4);
      const y = Chalkboard.real.val(parabola, 3); // Returns 5