src/main/java/de/javagl/geom/Lines.java
/**
     * Scale the given line with the given factor, about its starting point,
     * and store the result in the given destination. If the given destination 
     * is <code>null</code>, then a new line will be created and returned
     * 
     * @param factor The scaling factor
     * @param lineSrc The source line
     * @param lineDst The destination line
     * @return The destination line
     */
Scale the given line with the given factor, about its starting point,
and store the result in the given destination. If the given destination
is null, then a new line will be created and returned

@param factor The scaling factor
@param lineSrc The source line
@param lineDst The destination line
@return The destination line
Scale the given line with the given factor about its starting point and store the result in the given destination . If the given destination is null then a new line will be created and returned @param factor The scaling factor @param lineSrc The source line @param lineDst The destination line @return The destination line
public static Line2D scale(double factor, Line2D lineSrc, Line2D lineDst)
    {
        if (lineDst == null) 
        {
            lineDst = new Line2D.Double();
        }
        double x0 = lineSrc.getX1();
        double y0 = lineSrc.getY1();
        double x1 = lineSrc.getX2();
        double y1 = lineSrc.getY2();
        double dx = x1-x0;
        double dy = y1-y0;
        double newX1 = x0 + dx * factor;
        double newY1 = y0 + dy * factor;
        lineDst.setLine(x0, y0, newX1, newY1);
        return lineDst;
    }
public static Line2D scale ( double factor , Line2D lineSrc , Line2D lineDst ) { if ( lineDst == null ) { lineDst = new Line2D . Double ( ) ; } double x0 = lineSrc . getX1 ( ) ; double y0 = lineSrc . getY1 ( ) ; double x1 = lineSrc . getX2 ( ) ; double y1 = lineSrc . getY2 ( ) ; double dx = x1 - x0 ; double dy = y1 - y0 ; double newX1 = x0 + dx * factor ; double newY1 = y0 + dy * factor ; lineDst . setLine ( x0 , y0 , newX1 , newY1 ) ; return lineDst ; }
Scale the given line with the given factor, about its starting point,
 and store the result in the given destination.
Scale the given line with the given factor about its starting point and store the result in the given destination .