java line of code print Heart

Before you can see a line of code Python print heart-shaped console, I feel very magical, in fact, think of it yesterday suddenly java should also be possible, under execution in the stream blessing, share code is as follows:

 IntStream.range(-15, 15).map(y -> -y).forEach(y -> IntStream.range(-30, 30).forEach(x -> System.out.print(Math.pow(Math.pow((x * 0.05), 2) + Math.pow((y * 0.1), 2) - 1, 3) - Math.pow(x * 0.05, 2) * Math.pow(y * 0.1, 3) <= 0 ? "love".charAt(Math.abs((y - x) % 4)) : " " + (x == 29 ? "\n" : ""))));
复制代码

Welcome shoes are interested in the exchange

Guess you like

Origin juejin.im/post/5d2ec5a7e51d45108b2caf3e