mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Added GCD and LCM algorithms
This commit is contained in:
parent
390afc4d9d
commit
d69779a8cf
@ -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