18 #ifndef ION_MATH_ANGLEUTILS_H_
19 #define ION_MATH_ANGLEUTILS_H_
97 template <
int Dimension,
typename T>
100 static const T kOne =
static_cast<T>(1);
103 std::numeric_limits<T>::epsilon() * 100)
104 <<
"First input vector to AngleBetween must have unit length.";
106 std::numeric_limits<T>::epsilon() * 100)
107 <<
"Second input vector to AngleBetween must have unit length.";
117 #endif // ION_MATH_ANGLEUTILS_H_
T Tangent(const ion::math::Angle< T > &angle)
ion::math::Angle specialization of Tangent.
Angle< T > ArcTangent(T v)
Returns the inverse tangent of the given value.
Angle< T > AngleBetween(const ion::math::Vector< Dimension, T > &a, const ion::math::Vector< Dimension, T > &b)
Returns the angle between two unit vectors.
T Cosine(const ion::math::Angle< T > &angle)
ion::math::Angle specialization of Cosine.
T Dot(const Vector< Dimension, T > &v0, const Vector< Dimension, T > &v1)
Returns the dot (inner) product of two Vectors.
A simple class to represent angles.
T Radians() const
Get the angle in degrees or radians.
Angle< T > ArcSine(T v)
Returns the inverse sine of the given value.
const T Clamp(const T &val, const T &min_val, const T &max_val)
Clamps a value to lie between a minimum and maximum, inclusive.
Angle< T > ArcCosine(T v)
Returns the inverse cosine of the given value.
Angle< T > ArcTangent2(T y, T x)
Returns the four-quadrant inverse tangent of the given values.
static Angle FromRadians(const T &angle)
Create a angle from radians (no conversion).
#define DCHECK_LE(val1, val2)
T Sine(const ion::math::Angle< T > &angle)
ion::math::Angle specialization of Sine.
const T Abs(const T &val)
Returns the absolute value of a number in a type-safe way.
T LengthSquared(const Vector< Dimension, T > &v)
Returns the square of the length of a Vector.