GLM_FUNC_QUALIFIER vecType<T, P> fastCosNew(vecType<T, P> const & x) { vecType<T, P> const Angle0_PI(fastAbs(fmod(x + glm::pi<T>(), glm::two_pi<T>()) - glm::pi<T>())); return taylorSeriesNewCos6(x); /* vecType<bool, P> const FirstQuarterPi(lessThanEqual(Angle0_PI, vecType<T, P>(glm::half_pi<T>()))); vecType<T, P> const RevertAngle(mix(vecType<T, P>(glm::pi<T>()), vecType<T, P>(0), FirstQuarterPi)); vecType<T, P> const ReturnSign(mix(vecType<T, P>(-1), vecType<T, P>(1), FirstQuarterPi)); vecType<T, P> const SectionAngle(RevertAngle - Angle0_PI); return ReturnSign * taylorSeriesNewCos(SectionAngle); */ }
double numericzero(double d, double eps) { if( fastAbs(d) > eps) return d; return 0.0; }
bool iszeroeps(double d, double eps) { if( fastAbs(d) > eps) return false; return true; }