Fix: Possible compile error from missing define

This commit is contained in:
Hans Goudey 2025-01-15 14:55:39 -05:00
parent 2f493dc816
commit 40b3c6baf7

View file

@ -66,8 +66,8 @@ BLI_NOINLINE static void calculate_sphere_vertex_data(MutableSpan<float3> positi
const int segments,
const int rings)
{
const float delta_theta = M_PI / rings;
const float delta_phi = (2.0f * M_PI) / segments;
const float delta_theta = math::numbers::pi / rings;
const float delta_phi = (2.0f * math::numbers::pi) / segments;
Array<float, 64> segment_cosines(segments + 1);
for (const int segment : IndexRange(1, segments)) {
@ -289,7 +289,7 @@ static Bounds<float3> calculate_bounds_uv_sphere(const float radius,
const int segments,
const int rings)
{
const float delta_theta = M_PI / float(rings);
const float delta_theta = math::numbers::pi / float(rings);
const float sin_equator = std::sin(std::round(0.5f * rings) * delta_theta);
return calculate_bounds_radial_primitive(0.0f, radius * sin_equator, segments, radius);