Trigonometric traits template. More...
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().