mirror of
https://projects.blender.org/blender/blender.git
synced 2025-01-22 07:22:12 -05:00
Fix: Possible compile error from missing define
This commit is contained in:
parent
2f493dc816
commit
40b3c6baf7
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue