Search code examples
java-8decompiling

Decompiled Java, pi math is in number form, simple


I have recently decompiled a Java program I had written quite a while ago, and I noticed where I had Math.pi it replaced it with 3.1415... etc, I also have gotten this weird number and I cannot figure out what it is, if it was a number I put in myself or the result of something the compiler did like with Pi. What is this number?

The number is 0.7853981633974483


Edit: Thank you, those who helped me I am sorry, I was not able to figure out this simple thing, I now know what it is and I will consider that in the future, I now know that when you decompile Java, it puts 3.1415... in place of the math.pi, and if it is math.pi * 2 it would do that math and put 6.283.. in place of it. I did not know that before.


Solution

  • 0.785398... is pi / 4. Without knowing more about the code we can't know if that makes sense to you or not...