Skip to content

Main content

Polygon Turn Cross Product Sign Tool

Classify the directed turn at a polygon vertex using the exact floating-point cross-product sign; no tolerance is inferred.

Loading tool…

Description

Form the cross product of the previous-to-current and current-to-next segments.

Geometric quantities depend on the coordinate system, the chosen shape, and compatible length units. A component formula can determine a midpoint, signed turn, or area term without validating an entire drawing or physical object.

Form the cross product of the previous-to-current and current-to-next segments.

When to use this tool

Use Polygon Turn Cross Product Sign when you need one geometric component under the stated shape and orientation convention.

How to use the tool and how it works

  1. Enter previousX, previousY, currentX, currentY, nextX, nextY. 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 crossProduct, turn. Use the output convention below.

Form the cross product of the previous-to-current and current-to-next segments. Return its value and label positive left, negative right, or zero collinear.1

Input fieldMeaning and unitsAccepted input
previousXPrevious XRequired. Finite number.
previousYPrevious YRequired. Finite number.
currentXCurrent XRequired. Finite number.
currentYCurrent YRequired. Finite number.
nextXNext XRequired. Finite number.
nextYNext YRequired. Finite number.
Output fieldInterpretationReturned shape
crossProductCross ProductRequired. Finite number.
turnTurnRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "previousX": 0,
    "previousY": 0,
    "currentX": 2,
    "currentY": 0,
    "nextX": 2,
    "nextY": 3
  },
  "output": {
    "crossProduct": 6,
    "turn": "left"
  }
}

Limitations and assumptions

  • This assumes Cartesian axes with positive y upward; screen coordinates can reverse the apparent turn, and no tolerance or polygon validity check is applied.
  • 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

Check the complete geometry and use a suitable geometric model for intersections, tolerances, and construction details.

References

  1. Calculation and input contract: geometry/polygon-turn-cross-product-sign — tool.io

Similar or alternative tools