2#include "Base/Headers/Angle.h"
32 return (T)(
sqrt(x * x + y * y));
49 return degree * g_type(0.01745329251994329576);
57 return rad * g_type(57.29577951308232087721);
66 x =
cos(theta1) +
cos(theta2);
67 y =
sin(theta1) +
sin(theta2);
71 return std::atan2(y, x);
105 template <
typename T>
108 T intervalWidth = u - l;
121 for (
int i = 0; i < size; ++i)
The primary namespace for the NDEVR SDK.
g_type rad2deg(g_type rad)
convert from radian to degree
T square(T x)
return the square value
bool arrayHasInvalid(const g_type *array, int size, int *nanIndex=0)
tests whether there is a Invalid in the array
constexpr t_type sign(t_type value)
A simple function that returns 1 for all values greater than or equal to 0 and -1 for all values less...
T wrap(T l, T x, T u)
wrap x to be in the interval [l, u]
g_type average_angle(g_type theta1, g_type theta2)
average two angles
static constexpr bool IsInvalid(const Angle< t_type > &value)
Checks whether the given Angle holds an invalid value.
T hypot(T x, T y)
return the hypot of x and y
T clamp(T l, T x, T u)
clamp x to the interval [l, u]
t_type sqrt(const t_type &value)
std::enable_if<!ObjectInfo< t_type >::Float, fltp08 >::type sin(const Angle< t_type > &angle)
Performs optimized sine operation on the given angle using pre-computed lookup table for optimal spee...
void(* ForceLinkFunction)(void)
The following two functions are used to force linkage with static libraries.
g_type deg2rad(g_type degree)
convert from degree to radian
T hypot_sqr(T x, T y)
return the squared hypot of x and y
std::enable_if<!ObjectInfo< t_type >::Float, fltp08 >::type cos(const Angle< t_type > &angle)
Performs optimized cosine operation on the given angle using pre-computed lookup table for optimal sp...
ForceLinker(ForceLinkFunction function)
Calls the provided function to force the linker to include the associated object file.