{
  "schemaVersion": 1,
  "slug": "edpi-calculator",
  "category": "gaming",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "64d581f0e0e97f5289e64b6782ad66cdbabd08b56143f572f896dec21865f39e",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/edpi-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "cm360 = 360 × 2.54 ÷ (DPI × S × Y)",
    "vars": [
      [
        "DPI",
        "Mouse DPI"
      ],
      [
        "S",
        "In-game sensitivity"
      ],
      [
        "Y",
        "Game yaw factor"
      ],
      [
        "cm360",
        "Mouse distance per 360° turn (cm)"
      ]
    ],
    "note": "eDPI = DPI × S; inverse: S = 360 × 2.54 ÷ (cm360 × Y × DPI). 2.54 converts inches to cm."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "OpenStax — Ratios and rates",
        "url": "https://openstax.org/books/prealgebra-2e/pages/5-6-ratios-and-rate"
      }
    ],
    "referenceRole": "definition",
    "implementationHash": "64d581f0e0e97f5289e64b6782ad66cdbabd08b56143f572f896dec21865f39e",
    "basis": "cm360 = 360 × 2.54 ÷ (DPI × S × Y)",
    "limitations": "The references explain definitions and methods; any extra preset must be checked against the assumptions on this page."
  },
  "contract": {
    "compute": "const yaw = game; const cm360 = (dpi > 0 && sensitivity > 0) ? 360/(sensitivity*yaw*dpi)*2.54 : 0; const sFor = (dpi > 0 && yaw > 0) ? 360/(preferredCm360/2.54)/yaw/dpi : 0; return { edpi: dpi*sensitivity, cm360: cm360, in360: cm360/2.54, cmPer360Inches: cm360/2, sensitivityForPreference: sFor };",
    "inputs": [
      {
        "name": "dpi",
        "type": "number",
        "default": 800,
        "min": 50,
        "max": 32000,
        "step": 50,
        "slider": true
      },
      {
        "name": "sensitivity",
        "type": "number",
        "default": 1,
        "min": 0.01,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "game",
        "type": "select",
        "default": 0.022,
        "options": [
          {
            "value": 0.022
          },
          {
            "value": 0.07
          },
          {
            "value": 0.0066
          },
          {
            "value": 0.00555
          }
        ]
      },
      {
        "name": "preferredCm360",
        "type": "number",
        "default": 40,
        "min": 5,
        "max": 200,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "edpi",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "cm360",
        "precision": 2,
        "unit": "cm"
      },
      {
        "name": "in360",
        "precision": 2,
        "unit": "in"
      },
      {
        "name": "cmPer360Inches",
        "precision": 2,
        "unit": "cm"
      },
      {
        "name": "sensitivityForPreference",
        "precision": 3,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
