fix: bug when converting double 2 int
This commit is contained in:
@ -5,7 +5,7 @@ inline ZYM::int2048 Any2Int(const std::any &value) {
|
||||
return *ptr;
|
||||
else if (auto ptr = std::any_cast<double>(&value)) {
|
||||
std::stringstream buf;
|
||||
buf << std::fixed << std::setprecision(0) << *ptr;
|
||||
buf << std::fixed << std::setprecision(0) << std::floor(*ptr);
|
||||
std::string tmp;
|
||||
buf >> tmp;
|
||||
return std::move(ZYM::int2048(tmp));
|
||||
|
Reference in New Issue
Block a user