Remove warning from double to float conversion

This commit is contained in:
Yousef Khadadeh 2026-02-12 14:28:50 +03:00
parent 75fedd545d
commit a935c48e13
2 changed files with 21 additions and 16 deletions

View file

@ -12,6 +12,10 @@ template <typename S, typename T> S convert_vec2(const T& t) {
return S{t[0], t[1]};
}
template <typename S, typename T> S convert_vec2_narrow_double_to_float(const T& t) {
return S{static_cast<float>(t[0]), static_cast<float>(t[1])};
}
template <typename S, typename T> S convert_vec3(const T& t) {
return S{t[0], t[1], t[2]};
}