1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 20:29:42 +00:00

Fixed comments.

This commit is contained in:
Thomas Harte 2017-08-11 20:22:14 -04:00
parent daafebe7ac
commit 69914faf02

View File

@ -14,13 +14,12 @@
namespace NumberTheory {
/*!
@returns The greatest common divisor of @c a and @c b as computed by Euclid's algorithm.
@returns The greatest common divisor of @c a and @c b.
*/
template<class T> T greatest_common_divisor(T a, T b) {
#if __cplusplus > 201402L
return std::gcd(a, b);
#else
// TODO: replace with the C++17 GCD function, once available.
if(a < b) {
std::swap(a, b);
}
@ -37,8 +36,8 @@ namespace NumberTheory {
}
/*!
@returns The least common multiple of @c a and @c b computed indirectly via Euclid's greatest
common divisor algorithm.
@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) {
if(a == b) return a;