mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-05 05:17:47 +08:00
38 lines
686 B
C++
38 lines
686 B
C++
/*
|
||
* FLOOR.h
|
||
*
|
||
* Copyright (c) 2019 hikyuu.org
|
||
*
|
||
* Created on: 2019-4-15
|
||
* Author: fasiondog
|
||
*/
|
||
|
||
#ifndef INDICATOR_CRT_FLOOR_H_
|
||
#define INDICATOR_CRT_FLOOR_H_
|
||
|
||
#include "CVAL.h"
|
||
|
||
namespace hku {
|
||
|
||
/**
|
||
* 向下舍入(向数值减小方向舍入)取整
|
||
* 用法:FLOOR(A)返回沿A数值减小方向最接近的整数
|
||
* 例如:FLOOR(12.3)求得12
|
||
* @ingroup Indicator
|
||
*/
|
||
Indicator HKU_API FLOOR();
|
||
Indicator FLOOR(price_t);
|
||
Indicator FLOOR(const Indicator& ind);
|
||
|
||
inline Indicator FLOOR(const Indicator& ind) {
|
||
return FLOOR()(ind);
|
||
}
|
||
|
||
inline Indicator FLOOR(price_t val) {
|
||
return FLOOR(CVAL(val));
|
||
}
|
||
|
||
} /* namespace */
|
||
|
||
#endif /* INDICATOR_CRT_ROUNDUP_H_ */
|