[Pixelle-commit] SF.net SVN: pixelle: [112] trunk/pixelle
Brought to you by:
dbrosius
|
From: <dbr...@us...> - 2008-06-29 00:03:46
|
Revision: 112
http://pixelle.svn.sourceforge.net/pixelle/?rev=112&view=rev
Author: dbrosius
Date: 2008-06-28 17:03:54 -0700 (Sat, 28 Jun 2008)
Log Message:
-----------
add pi() and e()
Modified Paths:
--------------
trunk/pixelle/etc/Pixelle.g
trunk/pixelle/htdocs/index.html
Modified: trunk/pixelle/etc/Pixelle.g
===================================================================
--- trunk/pixelle/etc/Pixelle.g 2008-06-28 23:57:09 UTC (rev 111)
+++ trunk/pixelle/etc/Pixelle.g 2008-06-29 00:03:54 UTC (rev 112)
@@ -306,6 +306,14 @@
{
mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Math", "exp", "(D)D");
}
+ | 'e' '(' ')'
+ {
+ mv.visitLdcInsn(Math.E);
+ }
+ | 'pi' '(' ')'
+ {
+ mv.visitLdcInsn(Math.PI);
+ }
| 'random'
{
mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Math", "random", "()D");
Modified: trunk/pixelle/htdocs/index.html
===================================================================
--- trunk/pixelle/htdocs/index.html 2008-06-28 23:57:09 UTC (rev 111)
+++ trunk/pixelle/htdocs/index.html 2008-06-29 00:03:54 UTC (rev 112)
@@ -76,6 +76,10 @@
The euler number (e) raised to an expression's power.</li>
<li>random(e)<br/>
A random number between 0 and 1</li>
+ <li>pi()<br/>
+ The number pi, the ratio of the circumference of a circle to its diameter</li>
+ <li>e()<br/>
+ The number e, the base of the natural logarithms</li>
</ul>
<p><pre>As of June 27, simple expressions should work. Some examples:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|