/** * Computes the coordinates of the point located at a given percentage on this line segment: * <br> {@code pointToPack.interpolate(firstEndpoint, secondEndpoint, percentage)} </br> * <p> * WARNING: This method generates garbage. * </p> * * @param percentage the percentage along this line segment of the point. Must be in [0, 1]. * @return the computed point. * @throws {@link RuntimeException} if {@code percentage} ∉ [0, 1]. */ public Point3d pointBetweenEndPointsGivenPercentageCopy(double percentage) { Point3d point = new Point3d(); pointBetweenEndPointsGivenPercentage(percentage, point); return point; }
public void pointBetweenEndPointsGivenPercantage(double percentage, FramePoint pointToPack) { checkReferenceFrameMatch(pointToPack); lineSegment3d.pointBetweenEndPointsGivenPercentage(percentage, pointToPack.getPoint()); }