31#ifndef FENNEC_MATH_TRIGONOMETRIC_H
32#define FENNEC_MATH_TRIGONOMETRIC_H
147#include <fennec/math/detail/_math.h>
167template<
typename genType>
169 return genType(
degrees * 0.01745329251994329576923690768489);
181template<
typename genType>
183 return genType(
radians * 57.29577951308232087679815481410517);
203template<
typename genType>
204constexpr genType
sin(genType x) {
217template<
typename genType>
218constexpr genType
cos(genType x) {
231template<
typename genType>
232constexpr genType
tan(genType x) {
252template<
typename genType>
253constexpr genType
asin(genType x) {
267template<
typename genType>
268constexpr genType
acos(genType x) {
282template<
typename genType>
283constexpr genType
atan(genType y_over_x) {
284 return ::atan(y_over_x);
298template<
typename genType>
299constexpr genType
atan(genType y, genType x) {
300 return ::atan2(
y, x);
319template<
typename genType>
320constexpr genType
sinh(genType x) {
331template<
typename genType>
332constexpr genType
cosh(genType x) {
343template<
typename genType,
size_t...i>
344constexpr genType
tanh(genType x) {
362template<
typename genType,
size_t...i>
375template<
typename genType,
size_t...i>
388template<
typename genType,
size_t...i>
399#ifndef FENNEC_DOXYGEN
400template<
typename genType,
size_t...i>
401constexpr vector<genType, i...> radians(
const vector<genType, i...>& degrees) {
402 return vector<genType, i...>(degrees * 0.01745329251994329576923690768489);
405template<
typename genType,
size_t...i>
406constexpr vector<genType, i...>
degrees(
const vector<genType, i...>& radians) {
407 return genType(radians * 57.29577951308232087679815481410517);
410template<
typename genType,
size_t...i>
411constexpr vector<genType, i...>
sin(
const vector<genType, i...>& x) {
412 return vector<genType, i...>(
fennec::sin(x[i]) ...);
415template<
typename genType,
size_t...i>
416constexpr vector<genType, i...>
cos(
const vector<genType, i...>& x) {
417 return vector<genType, i...>(
fennec::cos(x[i]) ...);
420template<
typename genType,
size_t...i>
421constexpr vector<genType, i...>
tan(
const vector<genType, i...>& x) {
422 return vector<genType, i...>(
fennec::tan(x[i]) ...);
425template<
typename genType,
size_t...i>
426constexpr vector<genType, i...>
asin(
const vector<genType, i...>& x) {
430template<
typename genType,
size_t...i>
431constexpr vector<genType, i...>
acos(
const vector<genType, i...>& x) {
435template<
typename genType,
size_t...i>
436constexpr vector<genType, i...>
atan(
const vector<genType, i...>& y_over_x) {
437 return vector<genType, i...>(
fennec::atan(y_over_x[i]) ...);
440template<
typename genType,
size_t...i>
441constexpr vector<genType, i...>
atan(
const vector<genType, i...>& y,
const vector<genType, i...>& x) {
442 return vector<genType, i...>(
fennec::atan(y[i], x[i]) ...);
445template<
typename genType,
size_t...i>
446constexpr vector<genType, i...>
sinh(
const vector<genType, i...>& x) {
450template<
typename genType,
size_t...i>
451constexpr vector<genType, i...>
cosh(
const vector<genType, i...>& x) {
455template<
typename genType,
size_t...i>
456constexpr vector<genType, i...>
tanh(
const vector<genType, i...>& x) {
460template<
typename genType,
size_t...i>
461constexpr vector<genType, i...>
asinh(
const vector<genType, i...>& x) {
465template<
typename genType,
size_t...i>
466constexpr vector<genType, i...>
acosh(
const vector<genType, i...>& x) {
470template<
typename genType,
size_t...i>
471constexpr vector<genType, i...>
atanh(
const vector<genType, i...>& x) {
constexpr genType y()
Definition constants.h:672
constexpr genType asinh(genType x)
The Inverse Hyperbolic Sine Function.
Definition trigonometric.h:363
constexpr genType atanh(genType x)
The Inverse Hyperbolic Tangent Function.
Definition trigonometric.h:389
constexpr genType degrees(genType radians)
Converts to , i.e., .
Definition trigonometric.h:182
constexpr genType acos(genType x)
Arc Cosine. Returns an angle whose cosine is /a x.
Definition trigonometric.h:268
constexpr genType atan(genType y_over_x)
Arc Tangent. Returns an angle whose tangent is /a y_over_x.
Definition trigonometric.h:283
constexpr genType tan(genType x)
The Standard Trigonometric Tangent.
Definition trigonometric.h:232
constexpr genType cosh(genType x)
Returns the Hyperbolic Cosine Function, .
Definition trigonometric.h:332
constexpr genType radians(genType degrees)
Converts to , i.e., .
Definition trigonometric.h:168
constexpr genType tanh(genType x)
Returns the Hyperbolic Tangent Function, .
Definition trigonometric.h:344
constexpr genType sin(genType x)
The standard trigonometric sine.
Definition trigonometric.h:204
constexpr genType acosh(genType x)
The Inverse Hyperbolic Cosine Function.
Definition trigonometric.h:376
constexpr genType asin(genType x)
Arc Sine. Returns an angle whose sine is /a x.
Definition trigonometric.h:253
constexpr genType cos(genType x)
The Standard Trigonometric Cosine.
Definition trigonometric.h:218
constexpr genType sinh(genType x)
Returns the Hyperbolic Sine Function, .
Definition trigonometric.h:320