コード例 #1
0
	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);
*/
	}
コード例 #2
0
ファイル: helper.cpp プロジェクト: soberg/fruitcase
double numericzero(double d, double eps)
{
    if( fastAbs(d) > eps)
        return d;
    return 0.0;
}
コード例 #3
0
ファイル: helper.cpp プロジェクト: soberg/fruitcase
bool iszeroeps(double d, double eps)
{
    if( fastAbs(d) > eps)
        return false;
    return true;
}