summaryrefslogtreecommitdiff
path: root/doc/math/vector2.texi
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-09-24 21:06:41 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-09-24 21:06:41 -0400
commit1f1deea662da4328bf588c0642c8a90c7b1f2144 (patch)
treea7973b46b580ca2a9e8fb65f459e0004ae87b64f /doc/math/vector2.texi
parent7937b85219607a6e7755907e0752343344ed036c (diff)
Rough draft of manual.
Diffstat (limited to 'doc/math/vector2.texi')
-rw-r--r--doc/math/vector2.texi76
1 files changed, 76 insertions, 0 deletions
diff --git a/doc/math/vector2.texi b/doc/math/vector2.texi
new file mode 100644
index 0000000..13c2f80
--- /dev/null
+++ b/doc/math/vector2.texi
@@ -0,0 +1,76 @@
+@node Vectors
+@section Vectors
+
+2D vector math operations. Vector objects are of type vector2 to avoid
+confusion with regular Scheme vectors.
+
+@anchor{2d vector2 vector2}@defspec vector2
+@end defspec
+
+@anchor{2d vector2 vector2?}@defspec vector2?
+@end defspec
+
+@anchor{2d vector2 vx}@defspec vx
+@end defspec
+
+@anchor{2d vector2 vy}@defspec vy
+@end defspec
+
+@anchor{2d vector2 null-vector2}@defvar null-vector2
+@end defvar
+
+@anchor{2d vector2 identity-vector2}@defvar identity-vector2
+@end defvar
+
+@anchor{2d vector2 vector2-polar}@defun vector2-polar r theta
+Convert the polar coordinates (R, THETA) into a cartesian vector.
+
+@end defun
+
+@anchor{2d vector2 v+}@defun v+ . vectors
+Return the sum of all VECTORS.
+
+@end defun
+
+@anchor{2d vector2 v*}@defun v* . vectors
+Return the product of all VECTORS.
+
+@end defun
+
+@anchor{2d vector2 vscale}@defun vscale v scalar
+Multiply the vector V by a scalar value.
+
+@end defun
+
+@anchor{2d vector2 vmag}@defun vmag v
+Return the magnitude of the vector V.
+
+@end defun
+
+@anchor{2d vector2 vnorm}@defun vnorm v
+Normalize the vector V.
+
+@end defun
+
+@anchor{2d vector2 vdot}@defun vdot v1 v2
+Return the dot product of the vectors V1 and V2.
+
+@end defun
+
+@anchor{2d vector2 vcross}@defun vcross v1 v2
+Return the cross product of the vectors V1 and V2. Technically, the
+cross product of a 2D vector is not defined. This function instead
+returns the Z coordinate of the cross product as if the vectors were in
+3D space.
+
+@end defun
+
+@anchor{2d vector2 vector2-translate}@defun vector2-translate v
+Perform an OpenGL translate operation with the vector V.
+
+@end defun
+
+@anchor{2d vector2 vector2-scale}@defun vector2-scale v
+Perform an OpenGL scale operation with the vector V.
+
+@end defun