Chalkboard - v3.0.4
    Preparing search index...

    Function linear

    • Defines a linear function with two points.

      Parameters

      • x1: number

        The x-coordinate of the first point

      • y1: number

        The y-coordinate of the first point

      • x2: number

        The x-coordinate of the second point

      • y2: number

        The y-coordinate of the second point

      Returns ChalkboardFunction

      const line = Chalkboard.real.linear(0, 1, 2, 5);
      const y = Chalkboard.real.val(line, 3); // Returns 7