gcd (AutoLISP)

Returns the greatest common denominator of two integers

Supported Platforms: Windows and Mac OS

Signature

(gcd int1 int2)
int1

Type: Integer

An integer; must be greater than 0.

int2

Type: Integer

An integer; must be greater than 0.

Return Values

Type: Integer

An integer representing the greatest common denominator between int1 and int2.

Examples

(gcd 81 57)
3

(gcd 12 20)
4