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
- Enter previousX, previousY, currentX, currentY, nextX, nextY. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| previousX | Previous X | Required. Finite number. |
| previousY | Previous Y | Required. Finite number. |
| currentX | Current X | Required. Finite number. |
| currentY | Current Y | Required. Finite number. |
| nextX | Next X | Required. Finite number. |
| nextY | Next Y | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| crossProduct | Cross Product | Required. Finite number. |
| turn | Turn | Required. Text; maximum UTF-16 length 8192. |
{
"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
Similar or alternative tools
- Nautical Course Circular Difference
Normalize second minus first to [-180, 180) for signedDifferenceDegrees.
- Landscape Slope Station Grade
Divide signed elevation change by station distance and multiply by 100 for gradePercent.