⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utility.cpp

📁 BCAM 1394 Driver
💻 CPP
字号:
//-----------------------------------------------------------------------------
//  (c) 2002 by Basler Vision Technologies
//  Section:  Vision Components
//  Project:  BCAM
//  $Header: utility.cpp, 2, 02.10.2002 14:31:32, Nebelung, H.$
//-----------------------------------------------------------------------------
/**
\file     utility.cpp
\brief   Implementation of utility functions and classes
*/
//-----------------------------------------------------------------------------

#include "stdafx.h"
#include "utility.h"


// greatest common divisor
int gcd( int num1, int num2 )
{
  assert ( num1 != 0 );
  int remainder = num2 % num1;
  
  if ( remainder != 0 )
    return gcd( remainder,num1 );
  
  return num1;
}

// least common multiple
int lcm( int num1, int num2 )
{
  return ( num1 * num2 ) / gcd(num1, num2);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -