units
Use physical dimensions at compile-time or run-time.
Functions
vnix::impl Namespace Reference

Functions

template<typename A , typename B >
constexpr gcd_promoted< A, B > basic_gcd (A a, B b)
 Greatest common divisor of two nonnegative numbers. More...
 

Function Documentation

template<typename A , typename B >
constexpr gcd_promoted<A, B> vnix::impl::basic_gcd ( a,
b 
)

Greatest common divisor of two nonnegative numbers.

Parameters
aFirst nonnegative number.
bSecond nonnegative number.
Returns
Greatest common divisor.

Definition at line 27 of file gcd.hpp.

27  {
28  if (b == 0) { return a; }
29  return basic_gcd(b, a % b);
30 }
constexpr gcd_promoted< A, B > basic_gcd(A a, B b)
Greatest common divisor of two nonnegative numbers.
Definition: gcd.hpp:27