mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Added GCD and LCM algorithms
This commit is contained in:
parent
4f64c83a47
commit
c6bfa2873d
@ -49,6 +49,11 @@ namespace etl
|
||||
{
|
||||
ETL_STATIC_ASSERT(etl::is_integral<T>::value, "Integral type required");
|
||||
|
||||
if ((a == 0 || b == 0))
|
||||
{
|
||||
return (a + b);
|
||||
}
|
||||
|
||||
while (b != 0)
|
||||
{
|
||||
T t = b;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user