From 4dceb9d8fcc357704b6c1c4bdea01129470b812e Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sat, 15 Feb 2025 12:15:52 +0000 Subject: [PATCH] Codefix: Cast from double to float. --- src/tree_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp index 2d268dde83..ea1e9a6eab 100644 --- a/src/tree_cmd.cpp +++ b/src/tree_cmd.cpp @@ -228,7 +228,7 @@ static void CreateRandomStarShapedPolygon(int radius, std::span shape) /* Valid values for the phase of blob harmonics are between 0 and Tau. we can get a value in the correct range * from Random() by dividing the maximum possible value by the desired maximum, and then dividing the random * value by the result. */ - static constexpr float PHASE_DIVISOR = INT32_MAX / (M_PI * 2); + static constexpr float PHASE_DIVISOR = static_cast(INT32_MAX / M_PI * 2); /* These values are ones found in testing that result in suitable-looking polygons that did not self-intersect * and fit within a square of radius * radius dimensions. */