diff --git a/docs/snippets/all/archetypes/transform3d_partial_updates.cpp b/docs/snippets/all/archetypes/transform3d_partial_updates.cpp index 329905ca2cee..67854633ec3f 100644 --- a/docs/snippets/all/archetypes/transform3d_partial_updates.cpp +++ b/docs/snippets/all/archetypes/transform3d_partial_updates.cpp @@ -1,10 +1,12 @@ // Log different transforms with visualized coordinates axes. -#include #include -float truncated_radians(float deg) { - return static_cast(static_cast(deg * M_PI / 180.0f * 1000.0f)) / 1000.0f; +#define M_PI 3.14159265358979323846 + +float truncated_radians(int deg) { + auto degf = static_cast(deg); + return static_cast(static_cast(degf * M_PI / 180.0f * 1000.0f)) / 1000.0f; } int main() {