1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-21 17:16:44 +00:00

Removers Factors.hpp; now this is a C++17 project.

This commit is contained in:
Thomas Harte
2020-01-19 23:18:59 -05:00
parent 1b4b6b0aee
commit 98daad45c7
6 changed files with 3 additions and 40 deletions
-32
View File
@@ -1,32 +0,0 @@
//
// Factors.hpp
// Clock Signal
//
// Created by Thomas Harte on 29/07/2016.
// Copyright 2016 Thomas Harte. All rights reserved.
//
#ifndef Factors_hpp
#define Factors_hpp
#include <numeric>
#include <utility>
namespace Numeric {
/*!
@returns The greatest common divisor of @c a and @c b.
*/
template<class T> T greatest_common_divisor(T a, T b) {
return std::gcd(a, b);
}
/*!
@returns The least common multiple of @c a and @c b computed indirectly via the greatest
common divisor.
*/
template<class T> T least_common_multiple(T a, T b) {
return std::lcm(a, b);
}
}
#endif /* Factors_hpp */