Skip to content

Main content

Distance: Anisotropic Axis Scaled Gap Tool

Return one signed anisotropically scaled coordinate gap and its squared distance contribution under an explicit positive axis scale.

Loading tool…

Description

Return one normalized signed gap and squared contribution.

Weighted coordinate distances depend on whether weights multiply absolute differences or squared differences. Zero weights can make different vectors equivalent, and derivatives at a zero distance or absolute-value corner need explicit treatment.

Return one normalized signed gap and squared contribution.

When to use this tool

Use Distance: Anisotropic Axis Scaled Gap when checking one weighted-axis contribution, support rule or derivative.

How to use the tool and how it works

  1. Enter left, right, axisScale. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Return one normalized signed gap and squared contribution. Require axisScale > 0; normalizedGap = (right-left)/axisScale and squaredContribution is its square.1

Input fieldMeaning and unitsAccepted input
leftLeftRequired. Finite number.
rightRightRequired. Finite number.
axisScaleAxis ScaleRequired. Finite number.
Output fieldInterpretationReturned shape
resultReturned object; expand its named members below.Required. Object.
result.normalizedGapNormalized GapCalculated result member: number.
result.squaredContributionSquared ContributionCalculated result member: number.
json
{
  "input": {
    "left": 1,
    "right": 5,
    "axisScale": 2
  },
  "output": {
    "result": {
      "normalizedGap": 2,
      "squaredContribution": 4
    }
  }
}

Limitations and assumptions

  • The scale must match coordinate units; this is one axis, not a full distance.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use a complete distance implementation with an explicit weighting and missing-coordinate convention for vector comparison and optimization.

References

  1. Calculation and input contract: distance/anisotropic-axis-scaled-gap — tool.io

Similar or alternative tools