hikyuu2/hikyuu_pywrap/_util.cpp
2020-07-04 00:15:54 +08:00

41 lines
996 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.

/*
* _util.cpp
*
* Created on: 2011-12-4
* Author: fasiondog
*/
#include <boost/python.hpp>
#include <hikyuu/utilities/util.h>
using namespace boost::python;
using namespace hku;
void export_util() {
def("roundEx", roundEx, (arg("number"), arg("ndigits") = 0),
R"(roundEx(number[, ndigits=0])
ROUND_HALF_EVEN
:param float number
:param int ndigits
:rype: float)");
def("roundUp", roundUp, (arg("number"), arg("ndigits") = 0), R"(roundUp(number[, ndigits=0])
10.111
:param float number
:param int ndigits
:rtype: float)");
def("roundDown", roundDown, (arg("number"), arg("ndigits") = 0),
R"(roundDown(number[, ndigits=0])
10.110
:param float number
:param int ndigits
:rtype: float)");
}