![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
Math helpers. More...
Functions | |
| template<typename T> | |
| constexpr int | rz::sgn (T val) noexcept |
| Sign of a value: 1 if positive, -1 if negative, 0 if zero. | |
| double | rz::constrainAngle360 (double angle) noexcept |
| Wraps an angle in degrees to [0, 360). | |
| double | rz::constrainAngle180 (double angle) noexcept |
| Wraps an angle in degrees to [-180, 180). | |
| Angle | rz::constrainAngle360 (Angle angle) noexcept |
| Wraps an angle to [0, 2π). | |
| Angle | rz::constrainAngle180 (Angle angle) noexcept |
| Wraps an angle to [-π, π). | |
| double | rz::sinc (double x) noexcept |
| sin(x) / x, numerically stable near zero. | |
| std::optional< std::pair< double, double > > | rz::quadraticFormula (double a, double b, double c) noexcept |
| Real roots of ax² + bx + c = 0, smallest first. | |
Math helpers.
|
nodiscardnoexcept |
Wraps an angle in degrees to [-180, 180).
|
nodiscardnoexcept |
Wraps an angle in degrees to [0, 360).
|
nodiscardnoexcept |
Real roots of ax² + bx + c = 0, smallest first.
|
nodiscardconstexprnoexcept |
Sign of a value: 1 if positive, -1 if negative, 0 if zero.
Works for arithmetic types and au quantities.
|
nodiscardnoexcept |
sin(x) / x, numerically stable near zero.