File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -450,15 +450,15 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createSphere(float
450
450
// if (y==0)
451
451
// {
452
452
if (normal.y != -1 .0f && normal.y != 1 .0f )
453
- tu = static_cast <float >(acos (core::clamp (normal.x / sinay, -1.0 , 1.0 )) * 0.5 * core::RECIPROCAL_PI< double >());
453
+ tu = static_cast <float >(acos (core::clamp (normal.x / sinay, -1.0 , 1.0 )) * 0.5 * numbers::inv_pi< float32_t >());
454
454
if (normal.z < 0 .0f )
455
455
tu = 1 - tu;
456
456
// }
457
457
// else
458
458
// tu = ((float*)(tmpMem+(i-polyCountXPitch)*vertexSize))[4];
459
459
460
460
positions[vertex_i] = pos;
461
- uvs[vertex_i] = { packSnorm (tu), packSnorm (static_cast <float >(ay * core::RECIPROCAL_PI< double >())) };
461
+ uvs[vertex_i] = { packSnorm (tu), packSnorm (static_cast <float >(ay * numbers::inv_pi< float32_t >())) };
462
462
memcpy (normals + vertex_i, &quantizedNormal, sizeof (quantizedNormal));
463
463
464
464
vertex_i++;
@@ -563,7 +563,7 @@ core::smart_refctd_ptr<ICPUPolygonGeometry> CGeometryCreator::createCylinder(
563
563
}
564
564
565
565
const float tesselationRec = 1 .f / static_cast <float >(tesselation);
566
- const float step = 2 .f * core::PI< float >() * tesselationRec;
566
+ const float step = 2 .f * numbers::pi< float32_t > * tesselationRec;
567
567
for (uint32_t i = 0u ; i < tesselation; ++i)
568
568
{
569
569
const auto f_i = static_cast <float >(i);
You can’t perform that action at this time.
0 commit comments