Moved gcd and lcm implemetation

This commit is contained in:
mensinda
2016-04-06 10:21:59 +02:00
parent cc0fce8568
commit 51c80ecb80
2 changed files with 82 additions and 5 deletions

View File

@@ -56,8 +56,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "StandardShapes.h"
#include "Importer.h"
// We need boost::common_factor to compute the lcm/gcd of a number
#include <boost/math/common_factor_rt.hpp>
// We need Math.h to compute the lcm/gcd of a number
#include "Math.h"
#include <memory>
#include "../include/assimp/DefaultLogger.hpp"
#include "../include/assimp/mesh.h"
@@ -402,13 +402,13 @@ void IRRImporter::ComputeAnimations(Node* root, aiNode* real, std::vector<aiNode
int lcm = 360;
if (angles[0])
lcm = boost::math::lcm(lcm,angles[0]);
lcm = Math::lcm(lcm,angles[0]);
if (angles[1])
lcm = boost::math::lcm(lcm,angles[1]);
lcm = Math::lcm(lcm,angles[1]);
if (angles[2])
lcm = boost::math::lcm(lcm,angles[2]);
lcm = Math::lcm(lcm,angles[2]);
if (360 == lcm)
break;