Connection
Base URL, credentials and a reachable server.
Return the signed shortest difference between two degree angles in the interval from minus 180 inclusive to 180 exclusive.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
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