{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.calculatorx.com/schemas/math.geometry.coordinate/1.5.0/input.json",
  "title": "Coordinate geometry — input",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "distance",
        "midpoint",
        "slope",
        "line",
        "point_line",
        "intersect",
        "angle"
      ]
    },
    "x1": {
      "type": "number"
    },
    "y1": {
      "type": "number"
    },
    "x2": {
      "type": "number"
    },
    "y2": {
      "type": "number"
    },
    "x0": {
      "type": "number"
    },
    "y0": {
      "type": "number"
    },
    "x3": {
      "type": "number"
    },
    "y3": {
      "type": "number"
    },
    "x4": {
      "type": "number"
    },
    "y4": {
      "type": "number"
    }
  },
  "required": [
    "x1",
    "y1",
    "x2",
    "y2"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "point_line"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "x0",
          "y0"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "const": "intersect"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "x3",
          "y3",
          "x4",
          "y4"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "const": "angle"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "x3",
          "y3",
          "x4",
          "y4"
        ]
      }
    }
  ],
  "description": "Distance, midpoint, slope, two-point line, point-line distance, line intersection, and angle in the plane. Slope is not share-key m. Discovery /line-equation, /point-line-distance, /line-intersection, /angle-between-lines. Not Pythagorean, not CAS. (calculation_version 1.5.0)"
}
