Amal Bansode 8fd02bb626
types/geo: fix floating point bug causing NaN returns in SphericalAngleTo (#18777)
Subtle floating point imprecision can propagate and lead to
trigonometric functions receiving inputs outside their
domain, thus returning NaN. Clamp the input to the valid domain
to prevent this.

Also adds a fuzz test for SphericalAngleTo.

Updates tailscale/corp#37518

Signed-off-by: Amal Bansode <amal@tailscale.com>
2026-03-02 17:33:57 -08:00
..