|
PebbleOS
|
Fixed-point trigonometry helpers. More...
Macros | |
| #define | TRIG_PI 0x8000 |
| Angle value that corresponds to 180 degrees or PI radians. | |
| #define | TRIG_FP 16 |
| Number of fractional bits of the fixed-point ratio used by atan2_lookup(). | |
Functions | |
| uint32_t | normalize_angle (int32_t angle) |
| Normalize an angle to the range [0, TRIG_MAX_ANGLE]. | |
Fixed-point trigonometry helpers.
Angles are scaled so that TRIG_MAX_ANGLE is a full turn. Entities shared with the app SDK are documented in the SDK's Math group.
| #define TRIG_FP 16 |
Number of fractional bits of the fixed-point ratio used by atan2_lookup().
| #define TRIG_PI 0x8000 |
Angle value that corresponds to 180 degrees or PI radians.
| uint32_t normalize_angle | ( | int32_t | angle | ) |
Normalize an angle to the range [0, TRIG_MAX_ANGLE].
| angle | Angle, scaled so that TRIG_MAX_ANGLE is a full turn; may be negative. |