src/main/java/jbody/Simulator.java
/**
     * @param first     coordinates for first point
     * @param second    coordinates for second point
     * @return          distance between 2 points squared
     */
@param first     coordinates for first point
@param second    coordinates for second point
@return          distance between 2 points squared
@param first coordinates for first point @param second coordinates for second point @return distance between 2 points squared
private static double distance(double[] first, double[] second) {
        var x = Math.pow(second[0] - first[0], 2);
        var y = Math.pow(second[1] - first[1], 2);
        var z = Math.pow(second[2] - first[2], 2);
        return x + y + z;
    }
private static double distance ( double [ ] first , double [ ] second ) { var x = Math . pow ( second [ 0 ] - first [ 0 ] , 2 ) ; var y = Math . pow ( second [ 1 ] - first [ 1 ] , 2 ) ; var z = Math . pow ( second [ 2 ] - first [ 2 ] , 2 ) ; return x + y + z ; }
@param first     coordinates for first point
 @param second    coordinates for second point
 @return          distance between 2 points squared
@param first coordinates for first point @param second coordinates for second point @return distance between 2 points squared