thor::TrigonometricTraits< T > Struct Template Reference

Trigonometric traits template. More...

Detailed Description

template<typename T>
struct thor::TrigonometricTraits< T >

Trigonometric traits template.

This template can be specialized in order to implement trigonometric constants and functions for arbitrary types. Some of the definitions are required by the vector algebra functions. Thor supplies predefined specializations for float, double and long double.

To define your own traits, specialize the template inside namespace thor. The full specialization shall contain the following public static methods. You don't have to define all of them, depending on the functionality you need. For example, computing the vector length requires sqrt(), while the polar angle requires arcTan2().

Attention
All trigonometric functions take and return degrees, NOT radians.

The documentation for this struct was generated from the following file: