1,886 bytes added
, 07:46, 10 June 2022
The [[Toolchain:MCPCleanup/1.18|Toolchain:MCPCleanup]] utility has many functions, one among them is to convert known constants into code representation for easier visualisation.
== Constants ==
The known substitutions are:
* <code>1.7976[0-9]*[Ee]+308[Dd]</code> -> <code>Double.MAX_VALUE</code>
* <code>3.1415[0-9]*[Dd]</code> -> <code>Math.PI</code>
* <code>3.1415[0-9]*[Ff]</code> -> <code>(float)Math.PI</code>
* <code>6.2831[0-9]*[Dd]</code> -> <code>(Math.PI * 2D)</code>
* <code>6.2831[0-9]*[Ff]</code> -> <code>((float)Math.PI * 2F)</code>
* <code>4.7123[0-9]*[Dd]</code> -> <code>(Math.PI * 3D / 2D)</code>
* <code>4.7123[0-9]*[Ff]</code> -> <code>((float)Math.PI * 3F / 2F)</code>
* <code>0.7853[0-9]*[Dd]</code> -> <code>(Math.PI / 4D)</code>
* <code>0.7853[0-9]*[Ff]</code> -> <code>((float)Math.PI / 4F)</code>
* <code>6.2831[0-9]*[Ff]</code> -> <code>((float)Math.PI * 2F)</code>
* <code>0.6283[0-9]*[Dd]</code> -> <code>(Math.PI / 5D)</code>
* <code>0.6283[0-9]*[Ff]</code> -> <code>((float)Math.PI / 5F)</code>
* <code>57.295[0-9]*[Dd]</code> -> <code>(180D / Math.PI)</code>
* <code>57.295[0-9]*[Ff]</code> -> <code>(180F / (float)Math.PI)</code>
* <code>0.6981[0-9]*[Dd]</code> -> <code>(Math.PI * 2D / 9D)</code>
* <code>0.6981[0-9]*[Ff]</code> -> <code>((float)Math.PI * 2F / 9F)</code>
* <code>0.3141[0-9]*[Dd]</code> -> <code>(Math.PI / 10D)</code>
* <code>0.3141[0-9]*[Ff]</code> -> <code>((float)Math.PI / 10F)</code>
* <code>1.2566[0-9]*[Dd]</code> -> <code>(Math.PI * 2D / 5D)</code>
* <code>1.2566[0-9]*[Ff]</code> -> <code>((float)Math.PI 2F / 5F)</code>
* <code>0.21991[0-9]*[Dd]</code> -> <code>(Math.PI * 7D / 100D)</code>
* <code>0.21991[0-9]*[Ff]</code> -> <code>((float)Math.PI * 7F / 100F)</code>
* <code>5.8119[0-9]*[Dd]</code> -> <code>(Math.PI * 185D / 100D)</code>
* <code>0.8119[0-9]*[Ff]</code> -> <code>((float)Math.PI * 185F / 100F)</code>