ArcTern is a Windows AI coding client for working through angle calculations in source context. Discuss the direction and tie convention with a compatible model, then review normalization and input limits in its suggested changes.
A concrete starting point · Minimal signed angle differences ×
from math import isfinite
def angle_delta(source, target):
for value in (source, target):
if type(value) not in (int, float):
raise ValueError("angle.number")
if abs(value) > 1000000000000 or not isfinite(value):
raise ValueError("angle.range")
source, target = source % 360, target % 360
return (target - source + 180) % 360 - 180
✳Return the signed shortest difference between two degree angles in the interval from minus 180 inclusive to 180 exclusive.
✓ ChangesReview before applying ↗
Illustrative workspace
Project
Check wraparound and the opposite-angle tie, rejecting non-finite values, Booleans and magnitudes above 1000000000000 before normalizing each operand.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
from math import isfinite
def angle_delta(source, target):
for value in (source, target):
if type(value) not in (int, float):
raise ValueError("angle.number")
if abs(value) > 1000000000000 or not isfinite(value):
raise ValueError("angle.range")
source, target = source % 360, target % 360
return (target - source + 180) % 360 - 180
AI coding workspace
Make geometric assumptions visible in the code review
ArcTern is a Windows AI coding workspace for developers working through geometry-related application behavior. Open the project and describe the visible discrepancy, including the units and conventions the application uses. A connected model can help inspect the calculation and its consumers before proposing edits, so the review addresses the feature that depends on the result.
The angles.py example suggests a task about movement across an angular boundary. Ask how your code represents source and target directions, which sign indicates each direction and what should happen at an exact half turn. Those decisions belong to the application contract. Use the sample as a starting point for a focused investigation, then examine the display or control code that uses the returned value.
You may choose an unfiltered AI model when it is available through a supported OpenAI-compatible or Anthropic endpoint. Configure the required address and credentials while accounting for the service's tool and context limits. Review the proposed patch and run checks around wraparound, equal directions and the ambiguous half-turn case. Include the final consumer in verification. A calculation can satisfy a formula while still disagreeing with the directional convention the rest of your software expects.
Planning a geometry-related fix
What belongs in an angular bug example?
Provide the source and target, their units, the expected sign and where the result appears. Include a case crossing the boundary between a full turn and zero. Those details prevent an assumption about conventions from masquerading as a correction.
How should an exact half turn be resolved?
Choose the behavior your application requires and make it explicit. Either direction may fit a mathematical convention, but callers need consistency. Ask the assistant to locate existing assumptions before changing the tie behavior in a shared helper.
Can a helper-level test establish the visual result?
It establishes only the tested calculation. Also check the component that interprets its sign, scale or units. A reversed axis or different convention downstream can still produce the wrong movement even when the helper's own tests pass.
Does connecting an unfiltered model remove review work?
No. The label describes the selected model rather than the reliability of its geometry reasoning. Inspect the derivation against your stated conventions and run concrete cases. Endpoint restrictions and capabilities remain specific to the service you configure.