Merge pull request #477 from teyrana/fix_468_render_glitch

Fixes #468: Freeform fins display correctly again.
This commit is contained in:
Wes Cravens 2018-11-26 15:37:19 -06:00 committed by GitHub
commit d6870e77e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1095,6 +1095,13 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
xCur += increment;
}
// correct last point, if beyond a rounding error from body's end.
final int lastIndex = points.length - 1;
if( body.getLength()-0.000001 < points[lastIndex].x) {
points[lastIndex] = points[lastIndex].setX(body.getLength()).setY(body.getAftRadius());
}
return points;
}