CGAL::gcd

Definition

The function gcd computes the greatest common divisor of two values.

#include <CGAL/number_utils.h>

NT gcd ( NT ntval1, NT ntval2)
computes the greatest common divisor of two numbers. If ntval1 is 0, the function returns ntval2.
Precondition: : ntval2 is not zero.

Implementation

Uses Euclid's algorithm.