Skip to content

Commit efe951e

Browse files
committed
geom::Circle internal precision to double to address very large circles re: #2283
1 parent ff26626 commit efe951e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cinder/GeomIo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,10 +1884,10 @@ void Circle::loadInto( Target *target, const AttribSet &/*requestedAttribs*/ ) c
18841884
normals.emplace_back( 0, 0, 1 );
18851885

18861886
// iterate the segments
1887-
const float tDelta = 1 / (float)mNumSubdivisions * 2.0f * 3.14159f;
1888-
float t = 0;
1887+
const double tDelta = 1 / (double)mNumSubdivisions * 2 * 3.14159;
1888+
double t = 0;
18891889
for( int s = 0; s <= mNumSubdivisions; s++ ) {
1890-
vec2 unit( math<float>::cos( t ), math<float>::sin( t ) );
1890+
vec2 unit( (float)math<double>::cos( t ), (float)math<double>::sin( t ) );
18911891
positions.emplace_back( mCenter + unit * mRadius );
18921892
texCoords.emplace_back( unit * 0.5f + vec2( 0.5f ) );
18931893
normals.emplace_back( 0, 0, 1 );

0 commit comments

Comments
 (0)