mirror of
https://github.com/g-truc/glm.git
synced 2025-04-13 00:33:01 +00:00
Optimized taylorCos
This commit is contained in:
parent
969394a5eb
commit
29535189f1
1 changed files with 4 additions and 4 deletions
|
@ -8,10 +8,10 @@ namespace detail
|
|||
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;
|
||||
- (x * x) * (1.f / 2.f)
|
||||
+ (x * x * x * x) * (1.f / 24.f)
|
||||
- (x * x * x * x * x * x) * (1.f / 720.f)
|
||||
+ (x * x * x * x * x * x * x * x) (1.f / 40320.f);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
|
Loading…
Add table
Reference in a new issue