"math.h"
inline double Rounding(double x, int digit)
{
return (floor((x)* pow(float(10), digit) + 0.5f) / pow(float(10), digit));
}
// Define
#define ROUNDING(x, dig) ( floor((x) * pow(float(10), dig) + 0.5f) / pow(float(10), dig) )
'Language' 카테고리의 다른 글
#include <corecrt.h> include Path Error (0) | 2016.06.27 |
---|---|
컬렉션이 수정되었습니다. 열거 작업이 실행되지 않을 수도 있습니다 (0) | 2016.05.27 |
맴버 함수 const (0) | 2016.03.30 |
std::vector 의 resize() - reserve(), size() - capacity() (0) | 2016.03.30 |
class 에서도 struct *LP 구조 처럼 사용하기 (0) | 2015.12.07 |