Skip to content

Main content

Geometry: Line Angle Halfturn Canonical Form Tool

Canonicalize an unoriented planar line angle modulo a half-turn into [0,180), retaining the distinction from an oriented bearing.

Loading tool…

Description

Require angleDegrees within ±one billion and normalize modulo 180 into [0, 180), returning angleDegrees inside result.

Line and vector geometry depends on direction, orientation, and normalization. An unoriented line repeats after a half turn, while a directed bearing repeats after a full turn; a normal vector need not have unit length.

Require angleDegrees within ±one billion and normalize modulo 180 into [0, 180), returning angleDegrees inside result.

When to use this tool

Use Geometry: Line Angle Halfturn Canonical Form when you need an explicit line-direction, vector, or local planar calculation.

How to use the tool and how it works

  1. Enter angleDegrees. 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.

Require angleDegrees within ±one billion and normalize modulo 180 into [0, 180), returning angleDegrees inside result.1

Input fieldMeaning and unitsAccepted input
angleDegreesAngle Degrees Unit: deg.Required. Finite number.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.angleDegreesAngle DegreesCalculated result member: number.
json
{
  "input": {
    "angleDegrees": -10
  },
  "output": {
    "result": {
      "angleDegrees": 170
    }
  }
}

Limitations and assumptions

  • This is an unoriented line direction rather than a 360-degree directed bearing; no points, actual line, or reference axis are inferred.
  • 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

Construct the actual lines or vectors and apply the appropriate geometric tolerance. Resolve directed versus unoriented conventions and scaling before comparing coefficients or angles.

References

  1. Calculation and input contract: geometry/line-angle-halfturn-canonical-form — tool.io

Similar or alternative tools