Not Enough Math
Lightweight zero-dependency C++ math library
Loading...
Searching...
No Matches
trig.hpp File Reference
#include "config.hpp"
#include "utils.hpp"
#include "power.hpp"
#include <concepts>
#include "intrinsics.hpp"

Go to the source code of this file.

Classes

struct  nem::sincos< T >
 

Namespaces

namespace  nem
 

Macros

#define NEM_FAST_TRIG
 

Functions

template<nem::scalar_type T>
constexpr T nem::degrees (T degrees) noexcept
 Converts degrees to radians. Used to make units explicit.
 
template<nem::scalar_type T>
constexpr T nem::radians (T radians) noexcept
 Converts radians to radians (passes the argument unchanged). Used to make units explicit.
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::ft_sin_q1 (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::ft_cos_q1 (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::sin (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::cos (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr nem::sincos< T > nem::get_sincos (T radians)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::tan (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::ctg (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::sec (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::csc (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::ft_atan_q1 (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::atan (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::atan2 (T y, T x)
 
template<std::floating_point T>
constexpr T nem::acos (T x)
 
template<std::floating_point T>
constexpr T nem::asin (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::actg (T x)
 
template<std::floating_point T, int P = DEFAULT_TRIG_PRECISION>
constexpr T nem::actg2 (T x, T y)
 

Variables

static constexpr int nem::DEFAULT_TRIG_PRECISION = 1
 
static constexpr float nem::DEFAULT_TRIG_EPSILON = 0.01f
 

Macro Definition Documentation

◆ NEM_FAST_TRIG

#define NEM_FAST_TRIG

Definition at line 9 of file trig.hpp.