mirror of
https://github.com/esphome/esphome.git
synced 2026-09-13 16:18:41 +00:00
de71389c149dd8c7697aeb4dc9fa3af01f324adc
Replace acosf(y/distance) + sign flip with atan2f(-x, y) which computes the angle from the Y axis directly. This eliminates the division by distance, the acosf call, the sign branch, and the calculate_angle helper function entirely. atan2f also handles all quadrants correctly by definition, avoiding the edge-case guard that silently returned 0 when y was negative.
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
593 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
