{
  "schemaVersion": 1,
  "slug": "sleeve-length-calculator",
  "category": "fashion",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "d93fd306ee531e9d45fd77986935859dc342078ec2560f708d40794bf2075b59",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/sleeve-length-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": "S = h×k; k ∈ {0.335, 0.325}; S_cm = 2.54S",
    "vars": [
      [
        "h",
        "Height (in)"
      ],
      [
        "k",
        "Sleeve ratio"
      ],
      [
        "S",
        "Sleeve length (in)"
      ],
      [
        "S_cm",
        "Sleeve length (cm)"
      ]
    ],
    "note": "Sleeve estimate = height × selected profile factor; it is only a rough fit reference. Brand, cut and measurement method vary."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const h = unit === 'cm' ? height/2.54 : height; const sleeve = h*(sex === 'male' ? 0.335 : 0.325); return { sleeveIn: sleeve, sleeveCm: sleeve*2.54, shirtSize: Math.round(sleeve*2)/2 };",
    "inputs": [
      {
        "name": "height",
        "type": "number",
        "default": 70,
        "min": 50,
        "max": 90,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "unit",
        "type": "select",
        "default": "in",
        "options": [
          {
            "value": "in"
          },
          {
            "value": "cm"
          }
        ]
      },
      {
        "name": "sex",
        "type": "select",
        "default": "male",
        "options": [
          {
            "value": "male"
          },
          {
            "value": "female"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "sleeveIn",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "sleeveCm",
        "precision": 1,
        "unit": "cm"
      },
      {
        "name": "shirtSize",
        "precision": 0,
        "unit": ""
      }
    ],
    "interpret": null
  }
}
