Added experiment for new fastCos. More sRGB tests.
This commit is contained in:
@@ -33,6 +33,16 @@
|
||||
namespace glm{
|
||||
namespace detail
|
||||
{
|
||||
template <typename T, precision P, template <typename, precision> class vecType>
|
||||
GLM_FUNC_QUALIFIER vecType<T, P> taylorCos(vecType<T, P> const & x)
|
||||
{
|
||||
return static_cast<T>(1)
|
||||
- (x * x) / 2.f
|
||||
+ (x * x * x * x) / 24.f
|
||||
- (x * x * x * x * x * x) / 720.f
|
||||
+ (x * x * x * x * x * x * x * x) / 40320.f;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T cos_52s(T x)
|
||||
{
|
||||
@@ -66,11 +76,11 @@ namespace detail
|
||||
{
|
||||
T const angle(wrapAngle<T>(x));
|
||||
|
||||
if(angle<half_pi<T>())
|
||||
if(angle < half_pi<T>())
|
||||
return detail::cos_52s(angle);
|
||||
if(angle<pi<T>())
|
||||
if(angle < pi<T>())
|
||||
return -detail::cos_52s(pi<T>() - angle);
|
||||
if(angle<(T(3) * half_pi<T>()))
|
||||
if(angle < (T(3) * half_pi<T>()))
|
||||
return -detail::cos_52s(angle - pi<T>());
|
||||
|
||||
return detail::cos_52s(two_pi<T>() - angle);
|
||||
|
||||
Reference in New Issue
Block a user