Chalkboard - v3.0.1
    Preparing search index...

    Function interpolate

    • Calculates the interpolation of a vector.

      Parameters

      • vect: ChalkboardVector

        The vector

      • a: number

        The x-value (for 2D, 3D, and 4D vectors)

      • b: number

        The y-value (for 2D, 3D, and 4D vectors)

      • Optionalc: number

        The z-value (for 3D and 4D vectors)

      • Optionald: number

        The w-value (for 4D vectors)

      Returns ChalkboardVector

      // Returns (2.33, 2.33, 2.33) (interpolated vector with weights 2, 3, 1)
      const v = Chalkboard.vect.interpolate(Chalkboard.vect.init(1, 2, 4), 2, 3, 1);