hikyuu2/hikyuu_cpp/hikyuu/indicator/crt/FLOOR.h
2019-04-15 23:11:12 +08:00

38 lines
686 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* 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_ */