ENH:instead of prime_volume by filament_prime_volume

Jira: none

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: I96e7d0604da8f90678feed81833e3a634752ffff
(cherry picked from commit be02e769bb49680d6be678fc5fa73a141ca8da1c)
This commit is contained in:
qing.zhang
2025-01-20 11:31:33 +08:00
committed by Noisyfox
parent 9e024d1d4d
commit e7e6405ad3
15 changed files with 73 additions and 47 deletions

View File

@@ -131,6 +131,17 @@ inline DataType round_divide(DataType dividend, DataType divisor) //!< Return di
return (dividend + divisor / 2) / divisor;
}
template<typename T>
T get_max_element(const std::vector<T> &vec)
{
static_assert(std::is_arithmetic<T>::value, "T must be of numeric type.");
if (vec.empty())
return static_cast<T>(0);
return *std::max_element(vec.begin(), vec.end());
}
// Set a path with GUI localization files.
void set_local_dir(const std::string &path);
// Return a full path to the localization directory.