Celeritas
0.5.0-86+4a8eea4
|
Classes | |
struct | celeritas::TwoPi |
Unit for 2*pi radians. More... | |
struct | celeritas::HalfPi |
Unit for pi/2 radians. More... | |
Typedefs | |
using | celeritas::Turn = Quantity< TwoPi, real_type > |
Quantity denoting a full turn. More... | |
using | celeritas::QuarterTurn = Quantity< HalfPi, int > |
Quantity for an integer number of turns for axis swapping. | |
Functions | |
CELER_FORCEINLINE_FUNCTION real_type | celeritas::sin (Turn r) |
CELER_FORCEINLINE_FUNCTION real_type | celeritas::cos (Turn r) |
CELER_FORCEINLINE_FUNCTION void | celeritas::sincos (Turn r, real_type *sinv, real_type *cosv) |
CELER_FORCEINLINE_FUNCTION int | celeritas::cos (QuarterTurn r) |
CELER_FORCEINLINE_FUNCTION int | celeritas::sin (QuarterTurn r) |
CELER_FORCEINLINE_FUNCTION void | celeritas::sincos (QuarterTurn r, int *sinv, int *cosv) |
using celeritas::Turn = typedef Quantity<TwoPi, real_type> |
Quantity denoting a full turn.
Turns are a useful way of representing angles without the historical arbitrariness of degrees or the roundoff errors of radians. See, for example, https://www.computerenhance.com/p/turns-are-better-than-radians .
CELER_FORCEINLINE_FUNCTION int celeritas::cos | ( | QuarterTurn | r | ) |
Special overrides for math functions for more precise arithmetic
CELER_FORCEINLINE_FUNCTION real_type celeritas::cos | ( | Turn | r | ) |
Special overrides for math functions for more precise arithmetic
CELER_FORCEINLINE_FUNCTION int celeritas::sin | ( | QuarterTurn | r | ) |
Special overrides for math functions for more precise arithmetic
CELER_FORCEINLINE_FUNCTION real_type celeritas::sin | ( | Turn | r | ) |
Special overrides for math functions for more precise arithmetic
CELER_FORCEINLINE_FUNCTION void celeritas::sincos | ( | QuarterTurn | r, |
int * | sinv, | ||
int * | cosv | ||
) |
Special overrides for math functions for more precise arithmetic
CELER_FORCEINLINE_FUNCTION void celeritas::sincos | ( | Turn | r, |
real_type * | sinv, | ||
real_type * | cosv | ||
) |
Special overrides for math functions for more precise arithmetic