mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
db4ec4a12d
Replacing the C standard headers with the C++ standard headers causes various `error: call to 'floor' promotes float to double [performance-type-promotion-in-math-fn,-warnings-as-errors]`, which are fixed by using the C++ std math functions or our own math functions instead of the C math functions. - Use `absolute` instead of `abs` and `fabs`. - Use `std::floor` instead of `floor` and `floorf`. - Use `std::ceil` instead of `ceil`, `ceilf` and `round_ceil`. - Use `std::round` instead of `round` and `roundf`. - Use `std::sin` instead of `sin` and `sinf`. - Use `std::asin` instead of `asin` and `asinf`. - Use `std::cos` instead of `cos` and `cosf`. - Use `std::acos` instead of `acos` and `acosf`. - Use `std::tan` instead of `tan` and `tanf`. - Use `std::atan` instead of `atan` and `atanf`. - Use `std::pow` instead of `pow` and `powf`. - Use `std::log` instead of `log` and `logf`. - Use `std::log2` instead of `log2` and `log2f`. - Use `std::log10` instead of `log10` and `log10f`. - Use `std::pow` instead of `pow` and `powf`. - Use `std::sqrt` instead of `sqrt` and `sqrtf`. - Use `std::fmod` instead of `fmod` and `fmodf`. - Use `direction(Angle)` instead of `vec2(std::cos(Angle), std::sin(Angle))`. - Use `length(vec2(x, y))` instead of `std::sqrt(x * x + y * y)`. - Remove unused `NormalizeAngular` and `AngularDistance` functions. |
||
---|---|---|
.. | ||
null | ||
opengl | ||
opengles | ||
vulkan | ||
backend_base.cpp | ||
backend_base.h | ||
glsl_shader_compiler.cpp | ||
glsl_shader_compiler.h |