예제 #1
0
파일: isprime2.cpp 프로젝트: Neverous/team
long long unsigned int multiply(long long unsigned int a, long long unsigned int b, long long unsigned int MOD)
{
	if(bones(a) + bones(b) < 64)
		return (a * b) % MOD;

	long long unsigned int result = 0;
	for(long long unsigned int p = 1; p <= b; p <<= 1)
	{
		if(b & p)
			result = (result + a) % MOD;

		a = (a <<  1) % MOD;
	}

	return result;
}
예제 #2
0
파일: View.cpp 프로젝트: skyrpex/Flat2D_old
void View::setBoneTargetMode()
{
    if(m_targetMode == BoneTargetMode) {
        return;
    }

    m_targetMode = BoneTargetMode;

    foreach(Bone *bone, bones()) {
        bone->setOpacity(1);
        bone->setFlag(QGraphicsItem::ItemIsSelectable, true);
        bone->setFlag(QGraphicsItem::ItemIsMovable, true);
    }
예제 #3
0
void BoneHierarchy::detach_from_parent()
{
	bones("root")->set_parent(Bone_Ptr());
}
예제 #4
0
//#################### PUBLIC METHODS ####################
void BoneHierarchy::attach_to_parent(const BoneHierarchy_Ptr& parent, const std::string& parentBoneName)
{
	Bone_Ptr parentBone = parent->bones(parentBoneName);
	bones("root")->set_parent(parentBone);
}