[svn:parrot] r39750 - in trunk: examples/opengl runtime/parrot/library/OpenGL
japhb at svn.parrot.org
japhb at svn.parrot.org
Tue Jun 23 22:27:21 UTC 2009
Author: japhb
Date: Tue Jun 23 22:27:19 2009
New Revision: 39750
URL: https://trac.parrot.org/parrot/changeset/39750
Log:
[OpenGL] Math: document and show alternate instantiation syntax
Modified:
trunk/examples/opengl/math.pir
trunk/runtime/parrot/library/OpenGL/Math.pir
Modified: trunk/examples/opengl/math.pir
==============================================================================
--- trunk/examples/opengl/math.pir Tue Jun 23 21:31:52 2009 (r39749)
+++ trunk/examples/opengl/math.pir Tue Jun 23 22:27:19 2009 (r39750)
@@ -56,8 +56,7 @@
$P2 = new Vec4
$P2.'set_vals'($P0)
- $P3 = new Vec4
- $P3.'set_vals'($P1)
+ $P3 = Vec4.'new'('vals' => $P1)
.return ($P2, $P3)
.end
Modified: trunk/runtime/parrot/library/OpenGL/Math.pir
==============================================================================
--- trunk/runtime/parrot/library/OpenGL/Math.pir Tue Jun 23 21:31:52 2009 (r39749)
+++ trunk/runtime/parrot/library/OpenGL/Math.pir Tue Jun 23 22:27:19 2009 (r39750)
@@ -96,6 +96,11 @@
Create a new object representing a four-element vector. You will need
to set the initial values using the C<set_vals()> method.
+=item Vec4 vec4 = Vec4.'new'('vals' => vals)
+
+Create a new object representing a four-element vector, setting the
+initial values to the array PMC C<vals>.
+
=back
More information about the parrot-commits
mailing list