mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-05 05:17:47 +08:00
34 lines
489 B
C++
34 lines
489 B
C++
/*
|
|
* ABS.h
|
|
*
|
|
* Created on: 2019-4-2
|
|
* Author: fasiondog
|
|
*/
|
|
|
|
#ifndef INDICATOR_CRT_ABS_H_
|
|
#define INDICATOR_CRT_ABS_H_
|
|
|
|
#include "CVAL.h"
|
|
|
|
namespace hku {
|
|
|
|
/**
|
|
* 求绝对值
|
|
* @ingroup Indicator
|
|
*/
|
|
Indicator HKU_API ABS();
|
|
Indicator ABS(price_t);
|
|
Indicator ABS(const Indicator& ind);
|
|
|
|
inline Indicator ABS(const Indicator& ind) {
|
|
return ABS()(ind);
|
|
}
|
|
|
|
inline Indicator ABS(price_t val) {
|
|
return ABS(CVAL(val));
|
|
}
|
|
|
|
} /* namespace */
|
|
|
|
#endif /* INDICATOR_CRT_ABS_H_ */
|