mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
correction of gcd
This commit is contained in:
parent
662d2c66f0
commit
eaed14c9b6
1 changed files with 1 additions and 1 deletions
|
@ -536,7 +536,7 @@ function log_rands(minval, maxval, factor, N=1, seed=undef) =
|
||||||
// Description:
|
// Description:
|
||||||
// Computes the Greatest Common Divisor/Factor of `a` and `b`.
|
// Computes the Greatest Common Divisor/Factor of `a` and `b`.
|
||||||
function gcd(a,b) =
|
function gcd(a,b) =
|
||||||
assert(is_int(a) && is_int(b) && b!=0,"Arguments to gcd must be integers with a non zero divisor")
|
assert(is_int(a) && is_int(b),"Arguments to gcd must be integers")
|
||||||
b==0 ? abs(a) : gcd(b,a % b);
|
b==0 ? abs(a) : gcd(b,a % b);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue