[fixes #468] Fixes rendering issue with freeform fins
Cause by a fencepost-error when generating body points for freeform fins on transitions. Induced by the imprecision of floating point calculations.
This commit is contained in:
parent
151a4d864d
commit
786dd97558
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user