Class LineLineIntersection

Calculates the intersection of two lines.

Hierarchy

  • Procedures.Procedure<{
        line1: {
            a: number;
            b: number;
            c: number;
        };
        line2: {
            a: number;
            b: number;
            c: number;
        };
    }, {
        intersection: {
            x: number;
            y: number;
        };
        objectType: "point";
    } | {
        intersection: {
            a: number;
            b: number;
            c: number;
        };
        objectType: "line";
    } | {
        intersection: null;
        objectType: "null";
    }>
    • LineLineIntersection

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Performs the evaluation. Should be a pure function.

    Parameters

    • input: {
          line1: {
              a: number;
              b: number;
              c: number;
          };
          line2: {
              a: number;
              b: number;
              c: number;
          };
      }

      The input data.

      • line1: {
            a: number;
            b: number;
            c: number;
        }
        • a: number
        • b: number
        • c: number
      • line2: {
            a: number;
            b: number;
            c: number;
        }
        • a: number
        • b: number
        • c: number

    Returns {
        intersection: {
            x: number;
            y: number;
        };
        objectType: "point";
    } | {
        intersection: {
            a: number;
            b: number;
            c: number;
        };
        objectType: "line";
    } | {
        intersection: null;
        objectType: "null";
    }

    The output data.

  • Performs the procedure.

    Parameters

    • input: {
          line1: {
              a: number;
              b: number;
              c: number;
          };
          line2: {
              a: number;
              b: number;
              c: number;
          };
      }
      • line1: {
            a: number;
            b: number;
            c: number;
        }
        • a: number
        • b: number
        • c: number
      • line2: {
            a: number;
            b: number;
            c: number;
        }
        • a: number
        • b: number
        • c: number

    Returns {
        intersection: {
            x: number;
            y: number;
        };
        objectType: "point";
    } | {
        intersection: {
            a: number;
            b: number;
            c: number;
        };
        objectType: "line";
    } | {
        intersection: null;
        objectType: "null";
    }

Generated using TypeDoc