• + 0 comments

    Java 15

    public static List<Integer> findPoint(int px, int py, int qx, int qy) {
            List<Integer> result = new ArrayList<>();
    
            int shadowX = (2*qx) - px;
            int shadowY = (2*qy) - py;
    
            result.add(shadowX);
            result.add(shadowY);
    
            return result;
        }