# The gfxmath Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

# The gfxmath Reference Manual

This is the gfxmath Reference Manual, version 0.1.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Nov 15 05:53:26 2022 GMT+0.

## 1 Introduction

* gfxmath

#+BEGIN_QUOTE
GfxMath is a math library primarily for game development and graphical simulations, with a focus on
correctness, extensibility, and simplicity (in that order) over performance.

It provides a type hierarchy for matrices, vectors, and quaternions which can be used to perform
geometrical calculations useful for graphical applications, such as interfacing with OpenGL.

It takes a unique and somewhat opinionated approach to overcome some difficulties that we have
encountered as game developers.
#+END_QUOTE

- [[#rationale][Rationale]]
- [[#versioning][Versioning]]
- [[#usage][Usage]]
- [[#limitations][Limitations]]
- [[#unit-tests][Unit Tests]]
- [[#similar-projects][Similar Projects]]

** Rationale

GfxMath was written to favor an extensible and more maintainable generic function protocol over the
approach by some other libraries, such as [[https://git.mfiano.net/mfiano/origin][origin]], that
split types and the functions operating on them into separate packages.

Additionally, in contrast to some other libraries, GfxMath favors simplicity, which also aids in
maintainability. This is accomplished by a =define-op= macro that all operations are defined with,
and macros for iterating over the various shapes of the aggregate math types. The expansion of
=define-op= defines a generic function, all applicable methods matching the rules of a custom lambda
list that is parsed, as well as automatically generated documentation strings for the methods, by
means of a simple templating text pre-processor with knowledge of the custom lambda list for
emitting friendly names of the types it describes. With such an extensive array of mathematical
operations, keeping the library small and maintainable was one of our primary objectives, and
=define-op= was our solution.

Also to aid in simplicity, we roll the implementation of nearly all operations in loops, as opposed
to some other libraries that manually, or by means of a macro, unroll loop operations. Again, this
is to keep the codebase at a maintainable size. A notable exception is 4x4 matrix inversion, in
which we take the approach of a macro generating the piles of code.

Finally, GfxMath attempts to solve a real problem we've encountered in our work in the field of game
development. Single-precision floating point operations just do not have enough bits in their
representation to apply a chain of operations before the end result is uploaded to the GPU. Using
double-precision floating point values in the underlying storage of the math types means that we
have to coerce many arrays to single-precision floating point values many times per frame in a
graphical application, because it is a widely known fact that using double-precision floating point
values on the GPU is a serious performance trap. To combat this conundrum, all math types are
objects wrapping both a double-precision and single-precision floating point array. All operations
use the double-precision array for its extra guard bits to reduce numerical error, and the
single-precision floating point array remains initialized to all zero values until explicitly asked
to be filled with the values of the double-precision array with the =to-array= or =to-array!=
generic functions when supplied a =:single-float= keyword argument. This is space trade-off we are
willing to make, as it reduces precision issues with long chains of operations susceptible to
numerical error, and the extra space in system memory is rarely ever an issue, as there will likely
be a scarcity of available GPU memory long before system memory.

** Usage

Quicklisp users can also clone this repository to their =local-projects= directory and load the
system with it.

The complete API reference with all documentation strings is not included in this README, as it
would be quite lengthy. Instead, one can use Common Lisp's =apropos= functionality to search for
operations. All constructors are conveniently prefixed with =make-=. To list all constructors as an
example:

#+BEGIN_SRC common-lisp
(apropos "make" :gfxmath t)
#+END_SRC

After finding an interesting function, you can view the documentation of all associated methods with
=describe=. The following shows the documentation of all methods with the =*= (multiplication)
operator:

#+BEGIN_SRC lisp
(describe :gfxmath:*)
;; * names a generic function:
;; Lambda-list: (OBJECT1 OBJECT2)
;; Argument precedence order: (OBJECT1 OBJECT2)
;; Derived type: (FUNCTION (T T) *)
;; Method-combination: STANDARD
;; Methods:
;;   (* (QUATERNION QUATERNION))
;;     Documentation:
;;       Multiply the quaternion OBJECT1 by the quaternion OBJECT2, storing the result in a new quaternion.
;;   (* (MATRIX4 VECTOR4))
;;     Documentation:
;;       Multiply the 4x4 matrix OBJECT1 by the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.
;;   (* (MATRIX3 VECTOR3))
;;     Documentation:
;;       Multiply the 3x3 matrix OBJECT1 by the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.
;;   (* (MATRIX2 VECTOR2))
;;     Documentation:
;;       Multiply the 2x2 matrix OBJECT1 by the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.
;;   (* (MATRIX4 MATRIX4))
;;     Documentation:
;;       Multiply the 4x4 matrix OBJECT1 by the 4x4 matrix OBJECT2, storing the result in a new 4x4 matrix.
;;   (* (MATRIX3 MATRIX3))
;;     Documentation:
;;       Multiply the 3x3 matrix OBJECT1 by the 3x3 matrix OBJECT2, storing the result in a new 3x3 matrix.
;;   (* (MATRIX2 MATRIX2))
;;     Documentation:
;;       Multiply the 2x2 matrix OBJECT1 by the 2x2 matrix OBJECT2, storing the result in a new 2x2 matrix.
;;   (* (VECTOR4 VECTOR4))
;;     Documentation:
;;       Perform component-wise multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the corresponding component of the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.
;;   (* (VECTOR3 VECTOR3))
;;     Documentation:
;;       Perform component-wise multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the corresponding component of the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.
;;   (* (VECTOR2 VECTOR2))
;;     Documentation:
;;       Perform component-wise multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the corresponding component of the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.
;;   (* (QUATERNION REAL))
;;     Documentation:
;;       Perform scalar multiplication by multiplying each component of the quaternion OBJECT1 by the scalar OBJECT2, storing the result in a new quaternion.
;;   (* (VECTOR4 REAL))
;;     Documentation:
;;       Perform scalar multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 4-dimensional vector.
;;   (* (VECTOR3 REAL))
;;     Documentation:
;;       Perform scalar multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 3-dimensional vector.
;;   (* (VECTOR2 REAL))
;;     Documentation:
;;       Perform scalar multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 2-dimensional vector.
#+END_SRC

Note that if browsing the source code to discover the available functionality or documentation,
=define-op= is a macro that expands to possibly multiple methods each with a specific documentation
string.

** Limitations

- Some operations on matrices require knowledge of their intended use. For example, retrieving the
scale of a 3x3 matrix is meaningless, as it must be known whether the matrix represents a
2-dimensional transformation matrix or a 3-dimensional rotation matrix. Support for context-aware
matrices is a planned feature for v1.0.0.

** Unit Tests

GfxMath includes a suite of approximately 900 unit tests that cover the full range of the supported
mathematical operations. To run them all, do the following:

If using Quicklisp, first ensure you have [[https://github.com/fukamachi/prove][prove]] installed
with:

#+BEGIN_SRC common-lisp
#+END_SRC

Then, run:

#+BEGIN_SRC common-lisp
(asdf:test-system :gfxmath)
#+END_SRC

** Similar Projects

- [[https://git.mfiano.net/mfiano/origin][origin]]: A graphics math library with an emphasis on
correctness and performance. GfxMath was developed by one of the same authors, as an attempt to
favor extensibility and simplicity over performance, while still retaining the correctness quality.

- [[https://github.com/cbaggers/rtg-math][rtg-math]]

- [[https://github.com/Shinmera/3d-vectors][3d-vectors]] and [[https://github.com/Shinmera/3d-matrices][3d-matrices]]

## 2 Systems

The main system appears first, followed by any subsystem dependency.

Previous: , Up: Systems   [Contents][Index]

### 2.1 gfxmath

A graphics math library.

Author

Michael Fiano <mail@mfiano.net>

MIT

Version

0.1.1

Dependencies
• mfiano-utils (system).
• str (system).
Source
Child Components

## 3 Files

Files are sorted by type and then listed depth-first from the systems components trees.

Previous: , Up: Files   [Contents][Index]

### 3.1 Lisp

Next: , Previous: , Up: Lisp   [Contents][Index]

#### 3.1.1 gfxmath/gfxmath.asd

Source
Parent Component

gfxmath (system).

ASDF Systems

#### 3.1.2 gfxmath/package.lisp

Source
Parent Component

gfxmath (system).

Packages

#### 3.1.3 gfxmath/macros.lisp

Dependency

package.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface
Internals

#### 3.1.4 gfxmath/types.lisp

Dependency

macros.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface
Internals

#### 3.1.5 gfxmath/common.lisp

Dependency

types.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface
Internals

#### 3.1.6 gfxmath/shared-ops.lisp

Dependency

common.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface

#### 3.1.7 gfxmath/vector.lisp

Dependency

shared-ops.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface

#### 3.1.8 gfxmath/matrix.lisp

Dependency

vector.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface
Internals

Previous: , Up: Lisp   [Contents][Index]

#### 3.1.9 gfxmath/quaternion.lisp

Dependency

matrix.lisp (file).

Source
Parent Component

gfxmath (system).

Public Interface
Internals

%quaternion-to-matrix (function).

## 4 Packages

Packages are listed by definition order.

Previous: , Up: Packages   [Contents][Index]

Source
Use List

common-lisp.

Public Interface
Internals

## 5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.

Next: , Previous: , Up: Definitions   [Contents][Index]

### 5.1 Public Interface

Next: , Previous: , Up: Public Interface   [Contents][Index]

#### 5.1.1 Constants

Constant: +m2-id+

A 2x2 identity matrix.

Package
Source
Constant: +m2-zero+

A 2x2 matrix with each component set to 0.

Package
Source
Constant: +m3-id+

A 3x3 identity matrix.

Package
Source
Constant: +m3-zero+

A 3x3 matrix with each component set to 0.

Package
Source
Constant: +m4-id+

A 4x4 identity matrix.

Package
Source
Constant: +m4-zero+

A 4x4 matrix with each component set to 0.

Package
Source
Constant: +q-id+

An identity quaternion.

Package
Source
Constant: +v2+x+

A 2-dimensional vector representing a direction along the positive X axis.

Package
Source
Constant: +v2+y+

A 2-dimensional vector representing a direction along the positive Y axis.

Package
Source
Constant: +v2-ones+

A 2-dimensional vector with each component set to 1.

Package
Source
Constant: +v2-x+

A 2-dimensional vector representing a direction along the negative X axis.

Package
Source
Constant: +v2-y+

A 2-dimensional vector representing a direction along the negative Y axis.

Package
Source
Constant: +v2-zero+

A 2-dimensional zero vector.

Package
Source
Constant: +v3+x+

A 3-dimensional vector representing a direction along the positive X axis.

Package
Source
Constant: +v3+y+

A 3-dimensional vector representing a direction along the positive Y axis.

Package
Source
Constant: +v3+z+

A 3-dimensional vector representing a direction along the positive Z axis.

Package
Source
Constant: +v3-ones+

A 3-dimensional vector with each component set to 1.

Package
Source
Constant: +v3-x+

A 3-dimensional vector representing a direction along the negative X axis.

Package
Source
Constant: +v3-y+

A 3-dimensional vector representing a direction along the negative Y axis.

Package
Source
Constant: +v3-z+

A 3-dimensional vector representing a direction along the negative Z axis.

Package
Source
Constant: +v3-zero+

A 3-dimensional zero vector.

Package
Source
Constant: +v4+w+

A 4-dimensional vector representing a direction along the positive W axis.

Package
Source
Constant: +v4+x+

A 4-dimensional vector representing a direction along the positive X axis.

Package
Source
Constant: +v4+y+

A 4-dimensional vector representing a direction along the positive Y axis.

Package
Source
Constant: +v4+z+

A 4-dimensional vector representing a direction along the positive Z axis.

Package
Source
Constant: +v4-ones+

A 4-dimensional vector with each component set to 1.

Package
Source
Constant: +v4-w+

A 4-dimensional vector representing a direction along the negative W axis.

Package
Source
Constant: +v4-x+

A 4-dimensional vector representing a direction along the negative X axis.

Package
Source
Constant: +v4-y+

A 4-dimensional vector representing a direction along the negative Y axis.

Package
Source
Constant: +v4-z+

A 4-dimensional vector representing a direction along the negative Z axis.

Package
Source
Constant: +v4-zero+

A 4-dimensional zero vector.

Package
Source

#### 5.1.2 Macros

Macro: with-matrix (specs (&key read-only) &body body)

Lexically bind each component of the given matrices by prepending PREFIX to the to the row and ~ column indices. SPECS is a list of specifications, with each being of the form ~
(SIZE PREFIX OBJECT) where:

SIZE is the dimensionality of the matrix: 2, 3, or 4.

PREFIX is a symbol to prefix each row and column with: For example, ‘M‘ will produce a binding ~ named ‘M12‘ for the component located at row 1 and column 2 of the matrix.

OBJECT is the name of a variable bound to a matrix of the given SIZE.

If :READ-ONLY is nil, each binding is SETF-able.

Package
Source
Macro: with-quaternion (specs (&key read-only) &body body)

Lexically bind each component of the given quaternions by prepending PREFIX to the component ~ name. SPECS is a list of specifications, with each being of the form ~ (PREFIX OBJECT) where: ~

PREFIX is a symbol to prefix each component name with. For example, ‘Q‘ will produce a binding ~ named ‘QY‘ for the Y component of the quaternion.

OBJECT is the name of a variable bound to a quaternion.

If :READ-ONLY is nil, each binding is SETF-able.

Package
Source
Macro: with-vector (specs (&key read-only) &body body)

Lexically bind each component of the given vectors by prepending PREFIX to the component name. ~ SPECS is a list of specifications, with each being of the form (SIZE PREFIX OBJECT) where:

SIZE is the dimensionality of the vector: 2, 3, or 4.

PREFIX is a symbol to prefix each component name with. For example, ‘V‘ will produce a binding ~ named ‘VY‘ for the Y component of the vector.

OBJECT is the name of a variable bound to a vector of the given SIZE.

If :READ-ONLY is nil, each binding is SETF-able.

Package
Source

#### 5.1.3 Compiler macros

Compiler Macro: mat (size)
Package
Source
Compiler Macro: mat/from-mat (size matrix)
Package
Source
Compiler Macro: mat/from-vecs (&rest vectors)
Package
Source
Compiler Macro: mat/id (size)
Package
Source
Compiler Macro: mat/rotation (size axis angle)
Package
Source
Compiler Macro: vec (&rest components)
Package
Source
Compiler Macro: vec/zero (size)
Package
Source

#### 5.1.4 Ordinary functions

Function: mat (size)

Construct a matrix of the given SIZE, with each component set to 0.

Package
Source
Function: mat/from-mat (size matrix)

Construct a matrix of the given SIZE, by copying the components of the given MATRIX of any size ~ into it. If MATRIX has fewer rows or columns than SIZE, any remaining components along that axis ~ are set to zero, unless that component falls along the main diagonal, in which case it is set to ~ 1. If MATRIX has more rows or columns than SIZE, any remaining components along that axis are ~ dropped.

Package
Source
Function: mat/from-vecs (&rest vectors)

Construct a matrix from the given VECTORS. The vectors are written into the columns of the ~ resulting matrix. The number of vectors given determines the number of rows and columns of the ~ resulting matrix.

Package
Source
Function: mat/id (size)

Construct an identity matrix with a dimensionality equal to SIZE.

Package
Source
Function: mat/random (size &key min max)

Construct a matrix of the given SIZE with each component set to a random value bounded by MIN ~ and MAX.

Package
Source
Function: mat/rotation (size axis angle)

Construct a rotation matrix of the given SIZE that represents a rotation of ANGLE radians ~ around the given AXIS. AXIS may be :Z when SIZE is 2, or :X, :Y, or :Z when SIZE is 3 or 4.

Package
Source
Function: mref (object row column)

Get a component of a math object by row and column indices.

Package
Source
Function: (setf mref) (object row column)

Set a component of a math object by row and column indices.

Package
Source
Function: quat (w x y z)

Construct a quaternion with its components set to the corresponding argument.

Package
Source
Function: quat/from-axis-angle (axis angle)

Construct a quaternion from the ANGLE in radians around the axis denoted by the 3-dimensional ~ vector AXIS.

Package
Source
Function: quat/from-mat (matrix)

Construct a quaternion from the given matrix. MATRIX may be either a 3x3 or 4x4 matrix.

Package
Source
Function: quat/from-velocity (velocity delta)

Construct a unit quaternion representing an angular velocity rotation in DELTA units of time, ~ from the 3-dimensional vector VELOCITY, a vector with its magnitude representing a radians per ~ second rotation around its axis.

Package
Source
Function: quat/id ()

Construct an identity quaternion.

Package
Source
Function: quat/oriented (space &rest axes/angles)

Construct a quaternion representing a series of rotations around the axes and angles given. ~ AXES/ANGLES are pairs of axes and angles, with an axis being either one of the symbols :X, :Y, or ~ :Z, or a 3-dimensional vector representing an arbitrary axis, and angle being any real number ~ representing the angle in radians around its paired axis.

Package
Source
Function: ref (object index)

Get a component of a math object at the given column-major index.

Package
Source
Function: (setf ref) (object index)

Set a component of a math object at the given column-major index.

Package
Source
Function: vec (&rest components)
Package
Source
Function: vec/from-vec (size vector)
Package
Source
Function: vec/random (size &key min max)
Package
Source
Function: vec/velocity (axis rate)
Package
Source
Function: vec/zero (size)

Construct a zero vector of the given size.

Package
Source

#### 5.1.5 Generic functions

Generic Function: * (object1 object2)
Package
Source
Methods
Method: * ((object1 quaternion) (object2 quaternion))

Multiply the quaternion OBJECT1 by the quaternion OBJECT2, storing the result in a new quaternion.

Source
Method: * ((object1 matrix4) (object2 vector4))

Multiply the 4x4 matrix OBJECT1 by the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.

Source
Method: * ((object1 matrix3) (object2 vector3))

Multiply the 3x3 matrix OBJECT1 by the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.

Source
Method: * ((object1 matrix2) (object2 vector2))

Multiply the 2x2 matrix OBJECT1 by the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.

Source
Method: * ((object1 matrix4) (object2 matrix4))

Multiply the 4x4 matrix OBJECT1 by the 4x4 matrix OBJECT2, storing the result in a new 4x4 matrix.

Source
Method: * ((object1 matrix3) (object2 matrix3))

Multiply the 3x3 matrix OBJECT1 by the 3x3 matrix OBJECT2, storing the result in a new 3x3 matrix.

Source
Method: * ((object1 matrix2) (object2 matrix2))

Multiply the 2x2 matrix OBJECT1 by the 2x2 matrix OBJECT2, storing the result in a new 2x2 matrix.

Source
Method: * ((object1 vector4) (object2 vector4))

Perform component-wise multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the corresponding component of the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.

Source
Method: * ((object1 vector3) (object2 vector3))

Perform component-wise multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the corresponding component of the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.

Source
Method: * ((object1 vector2) (object2 vector2))

Perform component-wise multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the corresponding component of the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.

Source
Method: * ((object1 quaternion) (object2 real))

Perform scalar multiplication by multiplying each component of the quaternion OBJECT1 by the scalar OBJECT2, storing the result in a new quaternion.

Method: * ((object1 vector4) (object2 real))

Perform scalar multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 4-dimensional vector.

Method: * ((object1 vector3) (object2 real))

Perform scalar multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 3-dimensional vector.

Method: * ((object1 vector2) (object2 real))

Perform scalar multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 2-dimensional vector.

Generic Function: *! (object1 object2 out)
Package
Source
Methods
Method: *! ((object1 quaternion) (object2 quaternion) (out quaternion))

Multiply the quaternion OBJECT1 by the quaternion OBJECT2, storing the result in the quaternion OUT.

Source
Method: *! ((object1 matrix4) (object2 vector4) (out vector4))

Multiply the 4x4 matrix OBJECT1 by the 4-dimensional vector OBJECT2, storing the result in the 4-dimensional vector OUT.

Source
Method: *! ((object1 matrix3) (object2 vector3) (out vector3))

Multiply the 3x3 matrix OBJECT1 by the 3-dimensional vector OBJECT2, storing the result in the 3-dimensional vector OUT.

Source
Method: *! ((object1 matrix2) (object2 vector2) (out vector2))

Multiply the 2x2 matrix OBJECT1 by the 2-dimensional vector OBJECT2, storing the result in the 2-dimensional vector OUT.

Source
Method: *! ((object1 matrix4) (object2 matrix4) (out matrix4))

Multiply the 4x4 matrix OBJECT1 by the 4x4 matrix OBJECT2, storing the result in the 4x4 matrix OUT.

Source
Method: *! ((object1 matrix3) (object2 matrix3) (out matrix3))

Multiply the 3x3 matrix OBJECT1 by the 3x3 matrix OBJECT2, storing the result in the 3x3 matrix OUT.

Source
Method: *! ((object1 matrix2) (object2 matrix2) (out matrix2))

Multiply the 2x2 matrix OBJECT1 by the 2x2 matrix OBJECT2, storing the result in the 2x2 matrix OUT.

Source
Method: *! ((object1 vector4) (object2 vector4) (out vector4))

Perform component-wise multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the corresponding component of the 4-dimensional vector OBJECT2, storing the result in the 4-dimensional vector OUT.

Source
Method: *! ((object1 vector3) (object2 vector3) (out vector3))

Perform component-wise multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the corresponding component of the 3-dimensional vector OBJECT2, storing the result in the 3-dimensional vector OUT.

Source
Method: *! ((object1 vector2) (object2 vector2) (out vector2))

Perform component-wise multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the corresponding component of the 2-dimensional vector OBJECT2, storing the result in the 2-dimensional vector OUT.

Source
Method: *! ((object1 quaternion) (object2 real) (out quaternion))

Perform scalar multiplication by multiplying each component of the quaternion OBJECT1 by the scalar OBJECT2, storing the result in the quaternion OUT.

Method: *! ((object1 vector4) (object2 real) (out vector4))

Perform scalar multiplication by multiplying each component of the 4-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 4-dimensional vector OUT.

Method: *! ((object1 vector3) (object2 real) (out vector3))

Perform scalar multiplication by multiplying each component of the 3-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 3-dimensional vector OUT.

Method: *! ((object1 vector2) (object2 real) (out vector2))

Perform scalar multiplication by multiplying each component of the 2-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 2-dimensional vector OUT.

Generic Function: + (object1 object2)
Package
Source
Methods
Method: + ((object1 vector2) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 2-dimensional vector OBJECT1, storing the result in a new 2-dimensional vector.

Method: + ((object1 vector3) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 3-dimensional vector OBJECT1, storing the result in a new 3-dimensional vector.

Method: + ((object1 vector4) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 4-dimensional vector OBJECT1, storing the result in a new 4-dimensional vector.

Method: + ((object1 matrix2) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 2x2 matrix OBJECT1, storing the result in a new 2x2 matrix.

Method: + ((object1 matrix3) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 3x3 matrix OBJECT1, storing the result in a new 3x3 matrix.

Method: + ((object1 matrix4) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 4x4 matrix OBJECT1, storing the result in a new 4x4 matrix.

Method: + ((object1 quaternion) (object2 real))

Perform scalar addition by adding the scalar OBJECT2 to each component of the quaternion OBJECT1, storing the result in a new quaternion.

Method: + ((object1 vector2) (object2 vector2))

Perform component-wise addition by adding each component of the 2-dimensional vector OBJECT1 to te corresponding component of the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.

Method: + ((object1 vector3) (object2 vector3))

Perform component-wise addition by adding each component of the 3-dimensional vector OBJECT1 to te corresponding component of the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.

Method: + ((object1 vector4) (object2 vector4))

Perform component-wise addition by adding each component of the 4-dimensional vector OBJECT1 to te corresponding component of the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.

Method: + ((object1 matrix2) (object2 matrix2))

Perform component-wise addition by adding each component of the 2x2 matrix OBJECT1 to te corresponding component of the 2x2 matrix OBJECT2, storing the result in a new 2x2 matrix.

Method: + ((object1 matrix3) (object2 matrix3))

Perform component-wise addition by adding each component of the 3x3 matrix OBJECT1 to te corresponding component of the 3x3 matrix OBJECT2, storing the result in a new 3x3 matrix.

Method: + ((object1 matrix4) (object2 matrix4))

Perform component-wise addition by adding each component of the 4x4 matrix OBJECT1 to te corresponding component of the 4x4 matrix OBJECT2, storing the result in a new 4x4 matrix.

Method: + ((object1 quaternion) (object2 quaternion))

Perform component-wise addition by adding each component of the quaternion OBJECT1 to te corresponding component of the quaternion OBJECT2, storing the result in a new quaternion.

Generic Function: +! (object1 object2 out)
Package
Source
Methods
Method: +! ((object1 vector2) (object2 real) (out vector2))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 2-dimensional vector OBJECT1, storing the result in the 2-dimensional vector OUT.

Method: +! ((object1 vector3) (object2 real) (out vector3))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 3-dimensional vector OBJECT1, storing the result in the 3-dimensional vector OUT.

Method: +! ((object1 vector4) (object2 real) (out vector4))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 4-dimensional vector OBJECT1, storing the result in the 4-dimensional vector OUT.

Method: +! ((object1 matrix2) (object2 real) (out matrix2))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 2x2 matrix OBJECT1, storing the result in the 2x2 matrix OUT.

Method: +! ((object1 matrix3) (object2 real) (out matrix3))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 3x3 matrix OBJECT1, storing the result in the 3x3 matrix OUT.

Method: +! ((object1 matrix4) (object2 real) (out matrix4))

Perform scalar addition by adding the scalar OBJECT2 to each component of the 4x4 matrix OBJECT1, storing the result in the 4x4 matrix OUT.

Method: +! ((object1 quaternion) (object2 real) (out quaternion))

Perform scalar addition by adding the scalar OBJECT2 to each component of the quaternion OBJECT1, storing the result in the quaternion OUT.

Method: +! ((object1 vector2) (object2 vector2) (out vector2))

Perform component-wise addition by adding each component of the 2-dimensional vector OBJECT1 to the corresponding component of the 2-dimensional vector OBJECT2, storing the result in the 2-dimensional vector OUT.

Method: +! ((object1 vector3) (object2 vector3) (out vector3))

Perform component-wise addition by adding each component of the 3-dimensional vector OBJECT1 to the corresponding component of the 3-dimensional vector OBJECT2, storing the result in the 3-dimensional vector OUT.

Method: +! ((object1 vector4) (object2 vector4) (out vector4))

Perform component-wise addition by adding each component of the 4-dimensional vector OBJECT1 to the corresponding component of the 4-dimensional vector OBJECT2, storing the result in the 4-dimensional vector OUT.

Method: +! ((object1 matrix2) (object2 matrix2) (out matrix2))

Perform component-wise addition by adding each component of the 2x2 matrix OBJECT1 to the corresponding component of the 2x2 matrix OBJECT2, storing the result in the 2x2 matrix OUT.

Method: +! ((object1 matrix3) (object2 matrix3) (out matrix3))

Perform component-wise addition by adding each component of the 3x3 matrix OBJECT1 to the corresponding component of the 3x3 matrix OBJECT2, storing the result in the 3x3 matrix OUT.

Method: +! ((object1 matrix4) (object2 matrix4) (out matrix4))

Perform component-wise addition by adding each component of the 4x4 matrix OBJECT1 to the corresponding component of the 4x4 matrix OBJECT2, storing the result in the 4x4 matrix OUT.

Method: +! ((object1 quaternion) (object2 quaternion) (out quaternion))

Perform component-wise addition by adding each component of the quaternion OBJECT1 to the corresponding component of the quaternion OBJECT2, storing the result in the quaternion OUT.

Generic Function: - (object1 object2)
Package
Source
Methods
Method: - ((object1 vector2) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 2-dimensional vector OBJECT1, storing the result in a new 2-dimensional vector.

Method: - ((object1 vector3) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 3-dimensional vector OBJECT1, storing the result in a new 3-dimensional vector.

Method: - ((object1 vector4) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 4-dimensional vector OBJECT1, storing the result in a new 4-dimensional vector.

Method: - ((object1 matrix2) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 2x2 matrix OBJECT1, storing the result in a new 2x2 matrix.

Method: - ((object1 matrix3) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 3x3 matrix OBJECT1, storing the result in a new 3x3 matrix.

Method: - ((object1 matrix4) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 4x4 matrix OBJECT1, storing the result in a new 4x4 matrix.

Method: - ((object1 quaternion) (object2 real))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the quaternion OBJECT1, storing the result in a new quaternion.

Method: - ((object1 vector2) (object2 vector2))

Perform component-wise subtraction by subtracting each component of the 2-dimensional vector OBJECT2 from the corresponding component of the 2-dimensional vector OBJECT1, storing the result in a new 2-dimensional vector.

Method: - ((object1 vector3) (object2 vector3))

Perform component-wise subtraction by subtracting each component of the 3-dimensional vector OBJECT2 from the corresponding component of the 3-dimensional vector OBJECT1, storing the result in a new 3-dimensional vector.

Method: - ((object1 vector4) (object2 vector4))

Perform component-wise subtraction by subtracting each component of the 4-dimensional vector OBJECT2 from the corresponding component of the 4-dimensional vector OBJECT1, storing the result in a new 4-dimensional vector.

Method: - ((object1 matrix2) (object2 matrix2))

Perform component-wise subtraction by subtracting each component of the 2x2 matrix OBJECT2 from the corresponding component of the 2x2 matrix OBJECT1, storing the result in a new 2x2 matrix.

Method: - ((object1 matrix3) (object2 matrix3))

Perform component-wise subtraction by subtracting each component of the 3x3 matrix OBJECT2 from the corresponding component of the 3x3 matrix OBJECT1, storing the result in a new 3x3 matrix.

Method: - ((object1 matrix4) (object2 matrix4))

Perform component-wise subtraction by subtracting each component of the 4x4 matrix OBJECT2 from the corresponding component of the 4x4 matrix OBJECT1, storing the result in a new 4x4 matrix.

Method: - ((object1 quaternion) (object2 quaternion))

Perform component-wise subtraction by subtracting each component of the quaternion OBJECT2 from the corresponding component of the quaternion OBJECT1, storing the result in a new quaternion.

Generic Function: -! (object1 object2 out)
Package
Source
Methods
Method: -! ((object1 vector2) (object2 real) (out vector2))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 2-dimensional vector OBJECT1, storing the result in the 2-dimensional vector OUT.

Method: -! ((object1 vector3) (object2 real) (out vector3))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 3-dimensional vector OBJECT1, storing the result in the 3-dimensional vector OUT.

Method: -! ((object1 vector4) (object2 real) (out vector4))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 4-dimensional vector OBJECT1, storing the result in the 4-dimensional vector OUT.

Method: -! ((object1 matrix2) (object2 real) (out matrix2))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 2x2 matrix OBJECT1, storing the result in the 2x2 matrix OUT.

Method: -! ((object1 matrix3) (object2 real) (out matrix3))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 3x3 matrix OBJECT1, storing the result in the 3x3 matrix OUT.

Method: -! ((object1 matrix4) (object2 real) (out matrix4))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the 4x4 matrix OBJECT1, storing the result in the 4x4 matrix OUT.

Method: -! ((object1 quaternion) (object2 real) (out quaternion))

Perform scalar subtraction by subtracting the scalar OBJECT2 from each component of the quaternion OBJECT1, storing the result in the quaternion OUT.

Method: -! ((object1 vector2) (object2 vector2) (out vector2))

Perform component-wise subtraction by subtracting each component of the 2-dimensional vector OBJECT2 from the corresponding component of the 2-dimensional vector OBJECT1, storing the result in the 2-dimensional vector OUT.

Method: -! ((object1 vector3) (object2 vector3) (out vector3))

Perform component-wise subtraction by subtracting each component of the 3-dimensional vector OBJECT2 from the corresponding component of the 3-dimensional vector OBJECT1, storing the result in the 3-dimensional vector OUT.

Method: -! ((object1 vector4) (object2 vector4) (out vector4))

Perform component-wise subtraction by subtracting each component of the 4-dimensional vector OBJECT2 from the corresponding component of the 4-dimensional vector OBJECT1, storing the result in the 4-dimensional vector OUT.

Method: -! ((object1 matrix2) (object2 matrix2) (out matrix2))

Perform component-wise subtraction by subtracting each component of the 2x2 matrix OBJECT2 from the corresponding component of the 2x2 matrix OBJECT1, storing the result in the 2x2 matrix OUT.

Method: -! ((object1 matrix3) (object2 matrix3) (out matrix3))

Perform component-wise subtraction by subtracting each component of the 3x3 matrix OBJECT2 from the corresponding component of the 3x3 matrix OBJECT1, storing the result in the 3x3 matrix OUT.

Method: -! ((object1 matrix4) (object2 matrix4) (out matrix4))

Perform component-wise subtraction by subtracting each component of the 4x4 matrix OBJECT2 from the corresponding component of the 4x4 matrix OBJECT1, storing the result in the 4x4 matrix OUT.

Method: -! ((object1 quaternion) (object2 quaternion) (out quaternion))

Perform component-wise subtraction by subtracting each component of the quaternion OBJECT2 from the corresponding component of the quaternion OBJECT1, storing the result in the quaternion OUT.

Generic Function: / (object1 object2)
Package
Source
Methods
Method: / ((object1 vector4) (object2 vector4))

Perform component-wise division by dividing each component of the 4-dimensional vector OBJECT1 by the corresponding component of the 4-dimensional vector OBJECT2, storing the result in a new 4-dimensional vector.

Source
Method: / ((object1 vector3) (object2 vector3))

Perform component-wise division by dividing each component of the 3-dimensional vector OBJECT1 by the corresponding component of the 3-dimensional vector OBJECT2, storing the result in a new 3-dimensional vector.

Source
Method: / ((object1 vector2) (object2 vector2))

Perform component-wise division by dividing each component of the 2-dimensional vector OBJECT1 by the corresponding component of the 2-dimensional vector OBJECT2, storing the result in a new 2-dimensional vector.

Source
Method: / ((object1 quaternion) (object2 real))

Perform scalar division by dividing each component of the quaternion OBJECT1 by the scalar OBJECT2, storing the result in a new quaternion.

Method: / ((object1 vector4) (object2 real))

Perform scalar division by dividing each component of the 4-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 4-dimensional vector.

Method: / ((object1 vector3) (object2 real))

Perform scalar division by dividing each component of the 3-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 3-dimensional vector.

Method: / ((object1 vector2) (object2 real))

Perform scalar division by dividing each component of the 2-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in a new 2-dimensional vector.

Generic Function: /! (object1 object2 out)
Package
Source
Methods
Method: /! ((object1 vector4) (object2 vector4) (out vector4))

Perform component-wise division by dividing each component of the 4-dimensional vector OBJECT1 by the corresponding component of the 4-dimensional vector OBJECT2, storing the result in the 4-dimensional vector OUT.

Source
Method: /! ((object1 vector3) (object2 vector3) (out vector3))

Perform component-wise division by dividing each component of the 3-dimensional vector OBJECT1 by the corresponding component of the 3-dimensional vector OBJECT2, storing the result in the 3-dimensional vector OUT.

Source
Method: /! ((object1 vector2) (object2 vector2) (out vector2))

Perform component-wise division by dividing each component of the 2-dimensional vector OBJECT1 by the corresponding component of the 2-dimensional vector OBJECT2, storing the result in the 2-dimensional vector OUT.

Source
Method: /! ((object1 quaternion) (object2 real) (out quaternion))

Perform scalar division by dividing each component of the quaternion OBJECT1 by the scalar OBJECT2, storing the result in the quaternion OUT.

Method: /! ((object1 vector4) (object2 real) (out vector4))

Perform scalar division by dividing each component of the 4-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 4-dimensional vector OUT.

Method: /! ((object1 vector3) (object2 real) (out vector3))

Perform scalar division by dividing each component of the 3-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 3-dimensional vector OUT.

Method: /! ((object1 vector2) (object2 real) (out vector2))

Perform scalar division by dividing each component of the 2-dimensional vector OBJECT1 by the scalar OBJECT2, storing the result in the 2-dimensional vector OUT.

Generic Function: < (vector1 vector2)
Package
Source
Methods
Method: < ((vector1 vector4) (vector2 vector4))

Check if each component of the 4-dimensional vector VECTOR1 is less than the corresponding component of the 4-dimensional vector VECTOR2.

Method: < ((vector1 vector3) (vector2 vector3))

Check if each component of the 3-dimensional vector VECTOR1 is less than the corresponding component of the 3-dimensional vector VECTOR2.

Method: < ((vector1 vector2) (vector2 vector2))

Check if each component of the 2-dimensional vector VECTOR1 is less than the corresponding component of the 2-dimensional vector VECTOR2.

Generic Function: <= (vector1 vector2)
Package
Source
Methods
Method: <= ((vector1 vector4) (vector2 vector4))

Check if each component of the 4-dimensional vector VECTOR1 is less than or equal to the corresponding component of the 4-dimensional vector VECTOR2.

Method: <= ((vector1 vector3) (vector2 vector3))

Check if each component of the 3-dimensional vector VECTOR1 is less than or equal to the corresponding component of the 3-dimensional vector VECTOR2.

Method: <= ((vector1 vector2) (vector2 vector2))

Check if each component of the 2-dimensional vector VECTOR1 is less than or equal to the corresponding component of the 2-dimensional vector VECTOR2.

Generic Function: = (object1 object2 &key rel abs)
Package
Source
Methods
Method: = ((object1 vector2) (object2 vector2) &key rel abs)

Check if all components of the given 2-dimensional vectors are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 vector3) (object2 vector3) &key rel abs)

Check if all components of the given 3-dimensional vectors are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 vector4) (object2 vector4) &key rel abs)

Check if all components of the given 4-dimensional vectors are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 matrix2) (object2 matrix2) &key rel abs)

Check if all components of the given 2x2 matrices are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 matrix3) (object2 matrix3) &key rel abs)

Check if all components of the given 3x3 matrices are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 matrix4) (object2 matrix4) &key rel abs)

Check if all components of the given 4x4 matrices are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Method: = ((object1 quaternion) (object2 quaternion) &key rel abs)

Check if all components of the given quaternions are equal. REL and ABS are the relative and absolute error tolerances used to determine equality.

Generic Function: > (vector1 vector2)
Package
Source
Methods
Method: > ((vector1 vector4) (vector2 vector4))

Check if each component of the 4-dimensional vector VECTOR1 is greater than the corresponding component of the 4-dimensional vector VECTOR2.

Method: > ((vector1 vector3) (vector2 vector3))

Check if each component of the 3-dimensional vector VECTOR1 is greater than the corresponding component of the 3-dimensional vector VECTOR2.

Method: > ((vector1 vector2) (vector2 vector2))

Check if each component of the 2-dimensional vector VECTOR1 is greater than the corresponding component of the 2-dimensional vector VECTOR2.

Generic Function: >= (vector1 vector2)
Package
Source
Methods
Method: >= ((vector1 vector4) (vector2 vector4))

Check if each component of the 4-dimensional vector VECTOR1 is greater than or equal to the corresponding component of the 4-dimensional vector VECTOR2.

Method: >= ((vector1 vector3) (vector2 vector3))

Check if each component of the 3-dimensional vector VECTOR1 is greater than or equal to the corresponding component of the 3-dimensional vector VECTOR2.

Method: >= ((vector1 vector2) (vector2 vector2))

Check if each component of the 2-dimensional vector VECTOR1 is greater than or equal to the corresponding component of the 2-dimensional vector VECTOR2.

Generic Function: abs (vector)
Package
Source
Methods
Method: abs ((vector vector4))

Compute the absolute value of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: abs ((vector vector3))

Compute the absolute value of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: abs ((vector vector2))

Compute the absolute value of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: abs! (vector out)
Package
Source
Methods
Method: abs! ((vector vector4) (out vector4))

Compute the absolute value of each component of the 4-dimensional vector VECTOR, storing the result in a the 4-dimensional vector OUT.

Method: abs! ((vector vector3) (out vector3))

Compute the absolute value of each component of the 3-dimensional vector VECTOR, storing the result in a the 3-dimensional vector OUT.

Method: abs! ((vector vector2) (out vector2))

Compute the absolute value of each component of the 2-dimensional vector VECTOR, storing the result in a the 2-dimensional vector OUT.

Generic Function: acos (vector)
Package
Source
Methods
Method: acos ((vector vector4))

Compute the trigonometric arccosine of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: acos ((vector vector3))

Compute the trigonometric arccosine of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: acos ((vector vector2))

Compute the trigonometric arccosine of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: acos! (vector out)
Package
Source
Methods
Method: acos! ((vector vector4) (out vector4))

Compute the trigonometric arccosine of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: acos! ((vector vector3) (out vector3))

Compute the trigonometric arccosine of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: acos! ((vector vector2) (out vector2))

Compute the trigonometric arccosine of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: angle (vector1 vector2)
Package
Source
Methods
Method: angle ((vector1 vector4) (vector2 vector4))

Compute the angle in radians between the 4-dimensional vectors VECTOR1 and VECTOR2.

Method: angle ((vector1 vector3) (vector2 vector3))

Compute the angle in radians between the 3-dimensional vectors VECTOR1 and VECTOR2.

Method: angle ((vector1 vector2) (vector2 vector2))

Compute the angle in radians between the 2-dimensional vectors VECTOR1 and VECTOR2.

Generic Function: anti-diagonal (matrix)
Package
Source
Methods
Method: anti-diagonal ((matrix matrix4))

Compute the anti-diagonal of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: anti-diagonal ((matrix matrix3))

Compute the anti-diagonal of the 3x3 matrix MATRIX, storing the result in a new 3x3 matrix.

Method: anti-diagonal ((matrix matrix2))

Compute the anti-diagonal of the 2x2 matrix MATRIX, storing the result in a new 2x2 matrix.

Generic Function: anti-diagonal! (matrix out)
Package
Source
Methods
Method: anti-diagonal! ((matrix matrix4) (out vector4))

Compute the anti-diagonal of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: anti-diagonal! ((matrix matrix3) (out vector3))

Compute the anti-diagonal of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: anti-diagonal! ((matrix matrix2) (out vector2))

Compute the anti-diagonal of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: asin (vector)
Package
Source
Methods
Method: asin ((vector vector4))

Compute the trigonometric arcsine of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: asin ((vector vector3))

Compute the trigonometric arcsine of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: asin ((vector vector2))

Compute the trigonometric arcsine of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: asin! (vector out)
Package
Source
Methods
Method: asin! ((vector vector4) (out vector4))

Compute the trigonometric arcsine of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: asin! ((vector vector3) (out vector3))

Compute the trigonometric arcsine of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: asin! ((vector vector2) (out vector2))

Compute the trigonometric arcsine of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: atan (vector)
Package
Source
Methods
Method: atan ((vector vector4))

Compute the trigonometric arctangent of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: atan ((vector vector3))

Compute the trigonometric arctangent of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: atan ((vector vector2))

Compute the trigonometric arctangent of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: atan! (vector out)
Package
Source
Methods
Method: atan! ((vector vector4) (out vector4))

Compute the trigonometric arctangent of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: atan! ((vector vector3) (out vector3))

Compute the trigonometric arctangent of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: atan! ((vector vector2) (out vector2))

Compute the trigonometric arctangent of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: ceiling (vector)
Package
Source
Methods
Method: ceiling ((vector vector4))

Take the ceiling of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: ceiling ((vector vector3))

Take the ceiling of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: ceiling ((vector vector2))

Take the ceiling of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: ceiling! (vector out)
Package
Source
Methods
Method: ceiling! ((vector vector4) (out vector4))

Take the ceiling of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: ceiling! ((vector vector3) (out vector3))

Take the ceiling of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: ceiling! ((vector vector2) (out vector2))

Take the ceiling of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: clamp (object min max)
Package
Source
Methods
Method: clamp ((object matrix4) (min real) (max real))

Clamp each component of the 4x4 matrix OBJECT to be within the range bounded by the corresponding components of the 4x4 matrices MIN and MAX, storing the result in a new 4x4 matrix.

Method: clamp ((object matrix3) (min real) (max real))

Clamp each component of the 3x3 matrix OBJECT to be within the range bounded by the corresponding components of the 3x3 matrices MIN and MAX, storing the result in a new 3x3 matrix.

Method: clamp ((object matrix2) (min real) (max real))

Clamp each component of the 2x2 matrix OBJECT to be within the range bounded by the corresponding components of the 2x2 matrices MIN and MAX, storing the result in a new 2x2 matrix.

Method: clamp ((object vector4) (min real) (max real))

Clamp each component of the 4-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 4-dimensional vectors MIN and MAX, storing the result in a new 4-dimensional vector.

Method: clamp ((object vector3) (min real) (max real))

Clamp each component of the 3-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 3-dimensional vectors MIN and MAX, storing the result in a new 3-dimensional vector.

Method: clamp ((object vector2) (min real) (max real))

Clamp each component of the 2-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 2-dimensional vectors MIN and MAX, storing the result in a new 2-dimensional vector.

Method: clamp ((object matrix4) (min matrix4) (max matrix4))

Clamp each component of the 4x4 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 4x4 matrix.

Method: clamp ((object matrix3) (min matrix3) (max matrix3))

Clamp each component of the 3x3 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 3x3 matrix.

Method: clamp ((object matrix2) (min matrix2) (max matrix2))

Clamp each component of the 2x2 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 2x2 matrix.

Method: clamp ((object vector4) (min vector4) (max vector4))

Clamp each component of the 4-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 4-dimensional vector.

Method: clamp ((object vector3) (min vector3) (max vector3))

Clamp each component of the 3-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 3-dimensional vector.

Method: clamp ((object vector2) (min vector2) (max vector2))

Clamp each component of the 2-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in a new 2-dimensional vector.

Generic Function: clamp! (object min max out)
Package
Source
Methods
Method: clamp! ((object matrix4) (min real) (max real) (out matrix4))

Clamp each component of the 4x4 matrix OBJECT to be within the range bounded by the corresponding components of the 4x4 matrices MIN and MAX, storing the result in the 4x4 matrix OUT.

Method: clamp! ((object matrix3) (min real) (max real) (out matrix3))

Clamp each component of the 3x3 matrix OBJECT to be within the range bounded by the corresponding components of the 3x3 matrices MIN and MAX, storing the result in the 3x3 matrix OUT.

Method: clamp! ((object matrix2) (min real) (max real) (out matrix2))

Clamp each component of the 2x2 matrix OBJECT to be within the range bounded by the corresponding components of the 2x2 matrices MIN and MAX, storing the result in the 2x2 matrix OUT.

Method: clamp! ((object vector4) (min real) (max real) (out vector4))

Clamp each component of the 4-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 4-dimensional vectors MIN and MAX, storing the result in the 4-dimensional vector OUT.

Method: clamp! ((object vector3) (min real) (max real) (out vector3))

Clamp each component of the 3-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 3-dimensional vectors MIN and MAX, storing the result in the 3-dimensional vector OUT.

Method: clamp! ((object vector2) (min real) (max real) (out vector2))

Clamp each component of the 2-dimensional vector OBJECT to be within the range bounded by the corresponding components of the 2-dimensional vectors MIN and MAX, storing the result in the 2-dimensional vector OUT.

Method: clamp! ((object matrix4) (min matrix4) (max matrix4) (out matrix4))

Clamp each component of the 4x4 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 4x4 matrix OUT.

Method: clamp! ((object matrix3) (min matrix3) (max matrix3) (out matrix3))

Clamp each component of the 3x3 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 3x3 matrix OUT.

Method: clamp! ((object matrix2) (min matrix2) (max matrix2) (out matrix2))

Clamp each component of the 2x2 matrix OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 2x2 matrix OUT.

Method: clamp! ((object vector4) (min vector4) (max vector4) (out vector4))

Clamp each component of the 4-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 4-dimensional vector OUT.

Method: clamp! ((object vector3) (min vector3) (max vector3) (out vector3))

Clamp each component of the 3-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 3-dimensional vector OUT.

Method: clamp! ((object vector2) (min vector2) (max vector2) (out vector2))

Clamp each component of the 2-dimensional vector OBJECT to be within the range bounded by the scalars MIN and MAX, storing the result in the 2-dimensional vector OUT.

Generic Function: conjugate (quaternion)
Package
Source
Methods
Method: conjugate ((quaternion quaternion))

Compute the conjugate of the quaternion QUATERNION, storing the result in a new quaternion.

Generic Function: conjugate! (quaternion out)
Package
Source
Methods
Method: conjugate! ((quaternion quaternion) (out quaternion))

Compute the conjugate of the quaternion QUATERNION, storing the result in the quaternion.

Generic Function: copy (object)
Package
Source
Methods
Method: copy ((object vector2))

Create a fresh copy of the 2-dimensional vector OBJECT.

Method: copy ((object vector3))

Create a fresh copy of the 3-dimensional vector OBJECT.

Method: copy ((object vector4))

Create a fresh copy of the 4-dimensional vector OBJECT.

Method: copy ((object matrix2))

Create a fresh copy of the 2x2 matrix OBJECT.

Method: copy ((object matrix3))

Create a fresh copy of the 3x3 matrix OBJECT.

Method: copy ((object matrix4))

Create a fresh copy of the 4x4 matrix OBJECT.

Method: copy ((object quaternion))

Create a fresh copy of the quaternion OBJECT.

Generic Function: copy! (object out)
Package
Source
Methods
Method: copy! ((object vector2) (out vector2))

Copy the components of the 2-dimensional vector OBJECT into the 2-dimensional vector OUT.

Method: copy! ((object vector3) (out vector3))

Copy the components of the 3-dimensional vector OBJECT into the 3-dimensional vector OUT.

Method: copy! ((object vector4) (out vector4))

Copy the components of the 4-dimensional vector OBJECT into the 4-dimensional vector OUT.

Method: copy! ((object matrix2) (out matrix2))

Copy the components of the 2x2 matrix OBJECT into the 2x2 matrix OUT.

Method: copy! ((object matrix3) (out matrix3))

Copy the components of the 3x3 matrix OBJECT into the 3x3 matrix OUT.

Method: copy! ((object matrix4) (out matrix4))

Copy the components of the 4x4 matrix OBJECT into the 4x4 matrix OUT.

Method: copy! ((object quaternion) (out quaternion))

Copy the components of the quaternion OBJECT into the quaternion OUT.

Generic Function: cos (vector)
Package
Source
Methods
Method: cos ((vector vector4))

Compute the trigonometric cosine of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: cos ((vector vector3))

Compute the trigonometric cosine of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: cos ((vector vector2))

Compute the trigonometric cosine of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: cos! (vector out)
Package
Source
Methods
Method: cos! ((vector vector4) (out vector4))

Compute the trigonometric cosine of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: cos! ((vector vector3) (out vector3))

Compute the trigonometric cosine of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: cos! ((vector vector2) (out vector2))

Compute the trigonometric cosine of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: cross (vector1 vector2)
Package
Source
Methods
Method: cross ((vector1 vector3) (vector2 vector3))

Compute the cross product of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 3-dimensional vector.

Generic Function: cross! (vector1 vector2 dest)
Package
Source
Methods
Method: cross! ((vector1 vector3) (vector2 vector3) (dest vector3))

Compute the cross product of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the {OUT:DESC} OUT.

Generic Function: default (object)
Package
Source
Methods
Method: default ((object quaternion))

Construct a default quaternion. Each math type has this method defined, and for quaternions this creates an identity quaternion.

Source
Method: default ((object matrix4))

Construct a default matrix of the same dimensions as OBJECT. Each math type has this method defined, and for matrices this creates an identity matrix.

Source
Method: default ((object matrix3))

Construct a default matrix of the same dimensions as OBJECT. Each math type has this method defined, and for matrices this creates an identity matrix.

Source
Method: default ((object matrix2))

Construct a default matrix of the same dimensions as OBJECT. Each math type has this method defined, and for matrices this creates an identity matrix.

Source
Method: default ((object vector4))

Construct a default vector of the same dimensions as OBJECT. Each math type has this method defined, and for vectors this creates a zero vector.

Source
Method: default ((object vector3))

Construct a default vector of the same dimensions as OBJECT. Each math type has this method defined, and for vectors this creates a zero vector.

Source
Method: default ((object vector2))

Construct a default vector of the same dimensions as OBJECT. Each math type has this method defined, and for vectors this creates a zero vector.

Source
Package
Source
Methods

Convert each component of the 4-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in a new 4-dimensional vector.

Convert each component of the 3-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in a new 3-dimensional vector.

Convert each component of the 2-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in a new 2-dimensional vector.

Package
Source
Methods
Method: degrees->radians! ((vector vector4) (out vector4))

Convert each component of the 4-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in the 4-dimensional vector OUT.

Method: degrees->radians! ((vector vector3) (out vector3))

Convert each component of the 3-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in the 3-dimensional vector OUT.

Method: degrees->radians! ((vector vector2) (out vector2))

Convert each component of the 2-dimensional vector VECTOR, which are assumed to be in degrees, to radians, storing the result in the 2-dimensional vector OUT.

Generic Function: determinant (matrix)
Package
Source
Methods
Method: determinant ((matrix matrix4))

Compute the determinant of the 4x4 matrix MATRIX, producing a scalar value.

Method: determinant ((matrix matrix3))

Compute the determinant of the 3x3 matrix MATRIX, producing a scalar value.

Generic Function: diagonal? (matrix)
Package
Source
Methods
Method: diagonal? ((matrix matrix4))

Check whether the 4x4 matrix MATRIX is a diagonal matrix.

Method: diagonal? ((matrix matrix3))

Check whether the 3x3 matrix MATRIX is a diagonal matrix.

Method: diagonal? ((matrix matrix2))

Check whether the 2x2 matrix MATRIX is a diagonal matrix.

Generic Function: dot (object1 object2)
Package
Source
Methods
Method: dot ((object1 quaternion) (object2 quaternion))

Compute the dot product between the quaternion OBJECT1 and the quaternion OBJECT2, producing a scalar value.

Method: dot ((object1 vector4) (object2 vector4))

Compute the dot product between the 4-dimensional vector OBJECT1 and the 4-dimensional vector OBJECT2, producing a scalar value.

Method: dot ((object1 vector3) (object2 vector3))

Compute the dot product between the 3-dimensional vector OBJECT1 and the 3-dimensional vector OBJECT2, producing a scalar value.

Method: dot ((object1 vector2) (object2 vector2))

Compute the dot product between the 2-dimensional vector OBJECT1 and the 2-dimensional vector OBJECT2, producing a scalar value.

Generic Function: expt (vector power)
Package
Source
Methods
Method: expt ((vector vector4) (power real))

Raise each component of the 4-dimensional vector VECTOR to the power of POWER, storing the result in a new 4-dimensional vector.

Method: expt ((vector vector3) (power real))

Raise each component of the 3-dimensional vector VECTOR to the power of POWER, storing the result in a new 3-dimensional vector.

Method: expt ((vector vector2) (power real))

Raise each component of the 2-dimensional vector VECTOR to the power of POWER, storing the result in a new 2-dimensional vector.

Generic Function: expt! (vector power out)
Package
Source
Methods
Method: expt! ((vector vector4) (power real) (out vector4))

Raise each component of the 4-dimensional vector VECTOR to the power of POWER, storing the result in the 4-dimensional vector OUT.

Method: expt! ((vector vector3) (power real) (out vector3))

Raise each component of the 3-dimensional vector VECTOR to the power of POWER, storing the result in the 3-dimensional vector OUT.

Method: expt! ((vector vector2) (power real) (out vector2))

Raise each component of the 2-dimensional vector VECTOR to the power of POWER, storing the result in the 2-dimensional vector OUT.

Generic Function: floor (vector)
Package
Source
Methods
Method: floor ((vector vector4))

Take the floor of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: floor ((vector vector3))

Take the floor of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: floor ((vector vector2))

Take the floor of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: floor! (vector out)
Package
Source
Methods
Method: floor! ((vector vector4) (out vector4))

Take the floor of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: floor! ((vector vector3) (out vector3))

Take the floor of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: floor! ((vector vector2) (out vector2))

Take the floor of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: fract (vector)
Package
Source
Methods
Method: fract ((vector vector4))

Extract the fractional component of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Note: This is computed as n - floor(n).

Method: fract ((vector vector3))

Extract the fractional component of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Note: This is computed as n - floor(n).

Method: fract ((vector vector2))

Extract the fractional component of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Note: This is computed as n - floor(n).

Generic Function: fract! (vector out)
Package
Source
Methods
Method: fract! ((vector vector4) (out vector4))

Extract the fractional component of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Note: This is computed as n - floor(n).

Method: fract! ((vector vector3) (out vector3))

Extract the fractional component of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Note: This is computed as n - floor(n).

Method: fract! ((vector vector2) (out vector2))

Extract the fractional component of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Note: This is computed as n - floor(n).

Generic Function: from-axis-angle! (axis angle out)
Package
Source
Methods
Method: from-axis-angle! ((axis vector3) (angle real) (out quaternion))

Modify the quaternion OUT to be oriented around the axis denoted by the 3-dimensional vector AXIS by ANGLE radians.

Generic Function: from-matrix (matrix out)
Package
Source
Methods
Method: from-matrix ((matrix matrix4) (out quaternion))

Convert the rotation of the 4x4 matrix MATRIX to a quaternion, storing the result in a new quaternion

Method: from-matrix ((matrix matrix3) (out quaternion))

Convert the rotation of the 3x3 matrix MATRIX to a quaternion, storing the result in a new quaternion

Generic Function: from-matrix! (matrix out)
Package
Source
Methods
Method: from-matrix! ((matrix matrix4) (out quaternion))

Convert the rotation of the 4x4 matrix MATRIX to a quaternion, storing the result in the quaternion OUT.

Method: from-matrix! ((matrix matrix3) (out quaternion))

Convert the rotation of the 3x3 matrix MATRIX to a quaternion, storing the result in the quaternion OUT.

Generic Function: from-velocity! (velocity delta out)
Package
Source
Methods
Method: from-velocity! ((velocity vector3) (delta real) (out quaternion))

Construct a unit quaternion representing an angular velocity rotation in DELTA units of time, from the 3-dimensional vector VELOCITY, a vector with its magnitude representing a radians per second rotation around its axis, storing the result in the quaternion OUT.

Generic Function: get-axis (matrix axis)
Package
Source
Methods
Method: get-axis ((matrix matrix4) (axis (eql :z)))

Get the Z rotation axis of the 4x4 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-axis ((matrix matrix4) (axis (eql :y)))

Get the Y rotation axis of the 4x4 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-axis ((matrix matrix4) (axis (eql :x)))

Get the X rotation axis of the 4x4 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-axis ((matrix matrix3) (axis (eql :y)))

Get the Y rotation axis of the 3x3 matrix MATRIX, storing the result in a new 2-dimensional vector.

Method: get-axis ((matrix matrix3) (axis (eql :x)))

Get the X rotation axis of the 3x3 matrix MATRIX, storing the result in a new 2-dimensional vector.

Method: get-axis ((matrix matrix2) (axis (eql :y)))

Get the Y rotation axis of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Method: get-axis ((matrix matrix2) (axis (eql :x)))

Get the X rotation axis of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Generic Function: get-axis! (matrix axis out)
Package
Source
Methods
Method: get-axis! ((matrix matrix4) (axis (eql :z)) (out vector3))

Get the Z rotation axis of the 4x4 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-axis! ((matrix matrix3) (axis (eql :z)) (out vector2))

Get the Z rotation axis of the 3x3 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Method: get-axis! ((matrix matrix4) (axis (eql :y)) (out vector3))

Get the Y rotation axis of the 4x4 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-axis! ((matrix matrix4) (axis (eql :x)) (out vector3))

Get the X rotation axis of the 4x4 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-axis! ((matrix matrix3) (axis (eql :y)) (out vector2))

Get the Y rotation axis of the 3x3 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Method: get-axis! ((matrix matrix3) (axis (eql :x)) (out vector2))

Get the X rotation axis of the 3x3 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Method: get-axis! ((matrix matrix2) (axis (eql :y)) (out vector2))

Get the Y rotation axis of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Method: get-axis! ((matrix matrix2) (axis (eql :x)) (out vector2))

Get the X rotation axis of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: get-column (matrix index)
Package
Source
Methods
Method: get-column ((matrix matrix4) (index (eql 3)))

Get the 3rd column of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Method: get-column ((matrix matrix4) (index (eql 2)))

Get the 2nd column of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Method: get-column ((matrix matrix3) (index (eql 2)))

Get the 2nd column of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-column ((matrix matrix4) (index (eql 1)))

Get the 1st column of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Method: get-column ((matrix matrix4) (index (eql 0)))

Get the 0th column of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Method: get-column ((matrix matrix3) (index (eql 1)))

Get the 1st column of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-column ((matrix matrix3) (index (eql 0)))

Get the 0th column of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Method: get-column ((matrix matrix2) (index (eql 1)))

Get the 1st column of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Method: get-column ((matrix matrix2) (index (eql 0)))

Get the 0th column of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Generic Function: get-column! (matrix index out)
Package
Source
Methods
Method: get-column! ((matrix matrix4) (index (eql 3)) (out vector4))

Get the 3rd column of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: get-column! ((matrix matrix4) (index (eql 2)) (out vector4))

Get the 2nd column of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: get-column! ((matrix matrix3) (index (eql 2)) (out vector3))

Get the 2nd column of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-column! ((matrix matrix4) (index (eql 1)) (out vector4))

Get the 1st column of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: get-column! ((matrix matrix4) (index (eql 0)) (out vector4))

Get the 0th column of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: get-column! ((matrix matrix3) (index (eql 1)) (out vector3))

Get the 1st column of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-column! ((matrix matrix3) (index (eql 0)) (out vector3))

Get the 0th column of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-column! ((matrix matrix2) (index (eql 1)) (out vector2))

Get the 1st column of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Method: get-column! ((matrix matrix2) (index (eql 0)) (out vector2))

Get the 0th column of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: get-rotation (matrix)
Package
Source
Methods
Method: get-rotation ((matrix matrix4))

Get the rotation sub-matrix of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: get-rotation ((matrix matrix3))

Get the rotation sub-matrix of the 3x3 matrix MATRIX, storing the result in a new 3x3 matrix.

Generic Function: get-rotation! (matrix out)
Package
Source
Methods
Method: get-rotation! ((matrix matrix4) (out matrix3))

Get the rotation sub-matrix of the 4x4 matrix MATRIX, storing the result in the 3x3 matrix OUT.

Method: get-rotation! ((matrix matrix3) (out matrix2))

Get the rotation sub-matrix of the 3x3 matrix MATRIX, storing the result in the 2x2 matrix OUT.

Generic Function: get-row (matrix index)
Package
Source
Methods
Method: get-row ((matrix matrix4) (index (eql 3)))

Get the 3rd row of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix4) (index (eql 2)))

Get the 2nd row of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix3) (index (eql 2)))

Get the 2nd row of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix4) (index (eql 1)))

Get the 1st row of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix4) (index (eql 0)))

Get the 0th row of the 4x4 matrix MATRIX, storing the result in a new 4-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix3) (index (eql 1)))

Get the 1st row of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix3) (index (eql 0)))

Get the 0th row of the 3x3 matrix MATRIX, storing the result in a new 3-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix2) (index (eql 1)))

Get the 1st row of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row ((matrix matrix2) (index (eql 0)))

Get the 0th row of the 2x2 matrix MATRIX, storing the result in a new 2-dimensional vector.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Generic Function: get-row! (matrix index out)
Package
Source
Methods
Method: get-row! ((matrix matrix4) (index (eql 3)) (out vector4))

Get the 3rd row of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix4) (index (eql 2)) (out vector4))

Get the 2nd row of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix3) (index (eql 2)) (out vector3))

Get the 2nd row of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix4) (index (eql 1)) (out vector4))

Get the 1st row of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix4) (index (eql 0)) (out vector4))

Get the 0th row of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix3) (index (eql 1)) (out vector3))

Get the 1st row of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix3) (index (eql 0)) (out vector3))

Get the 0th row of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix2) (index (eql 1)) (out vector2))

Get the 1st row of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Method: get-row! ((matrix matrix2) (index (eql 0)) (out vector2))

Get the 0th row of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Note: The resulting vector does not change its shape; vectors are always column vectors.

Generic Function: get-scale (matrix)
Package
Source
Methods
Method: get-scale ((matrix matrix4))

Get the scale of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: get-scale ((matrix matrix2))

Get the scale of the 2x2 matrix MATRIX, storing the result in a new 2x2 matrix.

Generic Function: get-scale! (matrix out)
Package
Source
Methods
Method: get-scale! ((matrix matrix4) (out vector3))

Get the scale of the 4x4 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-scale! ((matrix matrix2) (out vector2))

Get the scale of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: get-translation (matrix)
Package
Source
Methods
Method: get-translation ((matrix matrix4))

Get the translation of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: get-translation ((matrix matrix3))

Get the translation of the 3x3 matrix MATRIX, storing the result in a new 3x3 matrix.

Generic Function: get-translation! (matrix out)
Package
Source
Methods
Method: get-translation! ((matrix matrix4) (out vector3))

Get the translation of the 4x4 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: get-translation! ((matrix matrix3) (out vector2))

Get the translation of the 3x3 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: id (object)
Package
Source
Methods
Method: id ((object quaternion))

Construct an identity quaternion.

Source
Method: id ((object matrix4))

Construct a new identity matrix of the same dimensions as OBJECT.

Source
Method: id ((object matrix3))

Construct a new identity matrix of the same dimensions as OBJECT.

Source
Method: id ((object matrix2))

Construct a new identity matrix of the same dimensions as OBJECT.

Source
Generic Function: id! (object)
Package
Source
Methods
Method: id! ((object quaternion))

Modify the quaternion OBJECT to be an identity quaternion.

Source
Method: id! ((object matrix4))

Modify the 4x4 matrix OBJECT to be an identity matrix.

Source
Method: id! ((object matrix3))

Modify the 3x3 matrix OBJECT to be an identity matrix.

Source
Method: id! ((object matrix2))

Modify the 2x2 matrix OBJECT to be an identity matrix.

Source
Generic Function: id? (object)
Package
Source
Methods
Method: id? ((object quaternion))

Check whether the quaternion OBJECT is an identity quaternion.

Source
Method: id? ((object matrix4))

Check if the 4x4 matrix OBJECT is an identity matrix.

Source
Method: id? ((object matrix3))

Check if the 3x3 matrix OBJECT is an identity matrix.

Source
Method: id? ((object matrix2))

Check if the 2x2 matrix OBJECT is an identity matrix.

Source
Generic Function: interpolate (object1 object2 parameter)
Package
Source
Methods
Method: interpolate ((object1 quaternion) (object2 quaternion) (parameter real))

Perform a suitable interpolation between the quaternions OBJECT1 and OBJECT2, storing the result in a new quaternion. This is the same as LERP for vectors and SLERP for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate ((object1 vector4) (object2 vector4) (parameter real))

Perform a suitable interpolation between the 4-dimensional vectors OBJECT1 and OBJECT2, storing the result in a new 4-dimensional vector. This is the same as LERP for vectors and SLERP for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate ((object1 vector3) (object2 vector3) (parameter real))

Perform a suitable interpolation between the 3-dimensional vectors OBJECT1 and OBJECT2, storing the result in a new 3-dimensional vector. This is the same as LERP for vectors and SLERP for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate ((object1 vector2) (object2 vector2) (parameter real))

Perform a suitable interpolation between the 2-dimensional vectors OBJECT1 and OBJECT2, storing the result in a new 2-dimensional vector. This is the same as LERP for vectors and SLERP for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Generic Function: interpolate! (object1 object2 parameter out)
Package
Source
Methods
Method: interpolate! ((object1 quaternion) (object2 quaternion) (parameter real) (out quaternion))

Perform a suitable interpolation between the quaternions OBJECT1 and OBJECT2, storing the result in the quaternion OUT. This is the same as LERP! for vectors and SLERP! for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate! ((object1 vector4) (object2 vector4) (parameter real) (out vector4))

Perform a suitable interpolation between the 4-dimensional vectors OBJECT1 and OBJECT2, storing the result in the 4-dimensional vector OUT. This is the same as LERP! for vectors and SLERP! for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate! ((object1 vector3) (object2 vector3) (parameter real) (out vector3))

Perform a suitable interpolation between the 3-dimensional vectors OBJECT1 and OBJECT2, storing the result in the 3-dimensional vector OUT. This is the same as LERP! for vectors and SLERP! for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Method: interpolate! ((object1 vector2) (object2 vector2) (parameter real) (out vector2))

Perform a suitable interpolation between the 2-dimensional vectors OBJECT1 and OBJECT2, storing the result in the 2-dimensional vector OUT. This is the same as LERP! for vectors and SLERP! for quaternions. It exists to conveniently dispatch to the appropriate interpolation method given the types of the objects.

Source
Generic Function: inverse (quaternion)
Package
Source
Methods
Method: inverse ((quaternion quaternion))

Compute the inverse of the quaternion QUATERNION, storing the result in a new quaternion.

Generic Function: inverse! (quaternion out)
Package
Source
Methods
Method: inverse! ((quaternion quaternion) (out quaternion))

Compute the inverse of the quaternion QUATERNION, storing the result in the quaternion OUT.

Generic Function: invert (object)
Package
Source
Methods
Method: invert ((object matrix4))

Invert the 4x4 matrix OBJECT, storing the result in a new {MATRIX:DESC}.

Source
Method: invert ((object matrix3))

Invert the 3x3 matrix OBJECT, storing the result in a new {MATRIX:DESC}.

Source
Method: invert ((vector vector4))

Invert each component of the 4-dimensional vector VECTOR (1/n), storing the result in a new 4-dimensional vector.

Source
Method: invert ((vector vector3))

Invert each component of the 3-dimensional vector VECTOR (1/n), storing the result in a new 3-dimensional vector.

Source
Method: invert ((vector vector2))

Invert each component of the 2-dimensional vector VECTOR (1/n), storing the result in a new 2-dimensional vector.

Source
Generic Function: invert! (object out)
Package
Source
Methods
Method: invert! ((object matrix4) (out matrix4))

Invert the 4x4 matrix OBJECT, storing the result in the 4x4 matrix OUT.

Source
Method: invert! ((object matrix3) (out matrix3))

Invert the 3x3 matrix OBJECT, storing the result in the 3x3 matrix OUT.

Source
Method: invert! ((vector vector4) (out vector4))

Invert each component of the 4-dimensional vector VECTOR (1/n), storing the result in the 4-dimensional vector OUT.

Source
Method: invert! ((vector vector3) (out vector3))

Invert each component of the 3-dimensional vector VECTOR (1/n), storing the result in the 3-dimensional vector OUT.

Source
Method: invert! ((vector vector2) (out vector2))

Invert each component of the 2-dimensional vector VECTOR (1/n), storing the result in the 2-dimensional vector OUT.

Source
Generic Function: lerp (vector1 vector2 parameter)
Package
Source
Methods
Method: lerp ((vector1 vector4) (vector2 vector4) (parameter real))

Perform a linear interpolation between the 4-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in a new 4-dimensional vector.

Method: lerp ((vector1 vector3) (vector2 vector3) (parameter real))

Perform a linear interpolation between the 3-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in a new 3-dimensional vector.

Method: lerp ((vector1 vector2) (vector2 vector2) (parameter real))

Perform a linear interpolation between the 2-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in a new 2-dimensional vector.

Generic Function: lerp! (vector1 vector2 parameter out)
Package
Source
Methods
Method: lerp! ((vector1 vector4) (vector2 vector4) (parameter real) (out vector4))

Perform a linear interpolation between the 4-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in the 4-dimensional vector OUT.

Method: lerp! ((vector1 vector3) (vector2 vector3) (parameter real) (out vector3))

Perform a linear interpolation between the 3-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in the 3-dimensional vector OUT.

Method: lerp! ((vector1 vector2) (vector2 vector2) (parameter real) (out vector2))

Perform a linear interpolation between the 2-dimensional vectors VECTOR1 and VECTOR2 by the parameter PARAMETER, storing the result in the 2-dimensional vector OUT.

Generic Function: look-at (eye target up)
Package
Source
Methods
Method: look-at ((eye vector3) (target vector3) (up vector3))

Construct a view matrix where the camera is located in 3-dimensional space at EYE, and rotated to look at the target point TARGET, with the camera’s up direction given as UP, storing the result in a new {MATRIX:DESC}.

Generic Function: look-at! (eye target up out)
Package
Source
Methods
Method: look-at! ((eye vector3) (target vector3) (up vector3) (out matrix4))

Modify the 4x4 matrix OUT to be a view matrix where the camera is located in 3-dimensional space at EYE, and rotated to look at the target point TARGET, with the camera’s up direction given as UP.

Generic Function: magnitude (object)
Package
Source
Methods
Method: magnitude ((object quaternion))

Compute the magnitude of the quaternion OBJECT, producing a scalar value.

Method: magnitude ((object vector4))

Compute the magnitude of the 4-dimensional vector OBJECT, producing a scalar value.

Method: magnitude ((object vector3))

Compute the magnitude of the 3-dimensional vector OBJECT, producing a scalar value.

Method: magnitude ((object vector2))

Compute the magnitude of the 2-dimensional vector OBJECT, producing a scalar value.

Generic Function: magnitude-squared (object)
Package
Source
Methods
Method: magnitude-squared ((object quaternion))

Compute the squared magnitude of the quaternion OBJECT, producing a scalar value.

Method: magnitude-squared ((object vector4))

Compute the squared magnitude of the 4-dimensional vector OBJECT, producing a scalar value.

Method: magnitude-squared ((object vector3))

Compute the squared magnitude of the 3-dimensional vector OBJECT, producing a scalar value.

Method: magnitude-squared ((object vector2))

Compute the squared magnitude of the 2-dimensional vector OBJECT, producing a scalar value.

Generic Function: main-diagonal (matrix)
Package
Source
Methods
Method: main-diagonal ((matrix matrix4))

Compute the main diagonal of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: main-diagonal ((matrix matrix3))

Compute the main diagonal of the 3x3 matrix MATRIX, storing the result in a new 3x3 matrix.

Method: main-diagonal ((matrix matrix2))

Compute the main diagonal of the 2x2 matrix MATRIX, storing the result in a new 2x2 matrix.

Generic Function: main-diagonal! (matrix out)
Package
Source
Methods
Method: main-diagonal! ((matrix matrix4) (out vector4))

Compute the main diagonal of the 4x4 matrix MATRIX, storing the result in the 4-dimensional vector OUT.

Method: main-diagonal! ((matrix matrix3) (out vector3))

Compute the main diagonal of the 3x3 matrix MATRIX, storing the result in the 3-dimensional vector OUT.

Method: main-diagonal! ((matrix matrix2) (out vector2))

Compute the main diagonal of the 2x2 matrix MATRIX, storing the result in the 2-dimensional vector OUT.

Generic Function: max (vector1 vector2)
Package
Source
Methods
Method: max ((vector1 vector4) (vector2 vector4))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 4-dimensional vector.

Method: max ((vector1 vector3) (vector2 vector3))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 3-dimensional vector.

Method: max ((vector1 vector2) (vector2 vector2))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 2-dimensional vector.

Generic Function: max! (vector1 vector2 out)
Package
Source
Methods
Method: max! ((vector1 vector4) (vector2 vector4) (out vector4))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 4-dimensional vector OUT.

Method: max! ((vector1 vector3) (vector2 vector3) (out vector3))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 3-dimensional vector OUT.

Method: max! ((vector1 vector2) (vector2 vector2) (out vector2))

Take the maximum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 2-dimensional vector OUT.

Generic Function: min (vector1 vector2)
Package
Source
Methods
Method: min ((vector1 vector4) (vector2 vector4))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 4-dimensional vector.

Method: min ((vector1 vector3) (vector2 vector3))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 3-dimensional vector.

Method: min ((vector1 vector2) (vector2 vector2))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in a new 2-dimensional vector.

Generic Function: min! (vector1 vector2 out)
Package
Source
Methods
Method: min! ((vector1 vector4) (vector2 vector4) (out vector4))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 4-dimensional vector OUT.

Method: min! ((vector1 vector3) (vector2 vector3) (out vector3))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 3-dimensional vector OUT.

Method: min! ((vector1 vector2) (vector2 vector2) (out vector2))

Take the minimum value of each of the corresponding components of the {VECTOR:DESC}s VECTOR1 and VECTOR2, storing the result in the 2-dimensional vector OUT.

Generic Function: mod (vector divisor)
Package
Source
Methods
Method: mod ((vector vector4) (divisor real))

For each component of the 4-dimensional vector compute the modulo of DIVISOR, storing the result in a new 4-dimensional vector.

Method: mod ((vector vector3) (divisor real))

For each component of the 3-dimensional vector compute the modulo of DIVISOR, storing the result in a new 3-dimensional vector.

Method: mod ((vector vector2) (divisor real))

For each component of the 2-dimensional vector compute the modulo of DIVISOR, storing the result in a new 2-dimensional vector.

Generic Function: mod! (vector divisor out)
Package
Source
Methods
Method: mod! ((vector vector4) (divisor real) (out vector4))

For each component of the 4-dimensional vector compute the modulo of DIVISOR, storing the result in the 4-dimensional vector OUT.

Method: mod! ((vector vector3) (divisor real) (out vector3))

For each component of the 3-dimensional vector compute the modulo of DIVISOR, storing the result in the 3-dimensional vector OUT.

Method: mod! ((vector vector2) (divisor real) (out vector2))

For each component of the 2-dimensional vector compute the modulo of DIVISOR, storing the result in the 2-dimensional vector OUT.

Generic Function: negate (object)
Package
Source
Methods
Method: negate ((object quaternion))

Negate each component of the quaternion OBJECT, storing the result in a new quaternion.

Method: negate ((object vector4))

Negate each component of the 4-dimensional vector OBJECT, storing the result in a new 4-dimensional vector.

Method: negate ((object vector3))

Negate each component of the 3-dimensional vector OBJECT, storing the result in a new 3-dimensional vector.

Method: negate ((object vector2))

Negate each component of the 2-dimensional vector OBJECT, storing the result in a new 2-dimensional vector.

Generic Function: negate! (object out)
Package
Source
Methods
Method: negate! ((object quaternion) (out quaternion))

Negate each component of the quaternion OBJECT, storing the result in the quaternion OUT.

Method: negate! ((object vector4) (out vector4))

Negate each component of the 4-dimensional vector OBJECT, storing the result in the 4-dimensional vector OUT.

Method: negate! ((object vector3) (out vector3))

Negate each component of the 3-dimensional vector OBJECT, storing the result in the 3-dimensional vector OUT.

Method: negate! ((object vector2) (out vector2))

Negate each component of the 2-dimensional vector OBJECT, storing the result in the 2-dimensional vector OUT.

Generic Function: normalize (object)
Package
Source
Methods
Method: normalize ((object quaternion))

Normalize the quaternion OBJECT to be of unit length, storing the result in a new quaternion.

Method: normalize ((object vector4))

Normalize the 4-dimensional vector OBJECT to be of unit length, storing the result in a new 4-dimensional vector.

Method: normalize ((object vector3))

Normalize the 3-dimensional vector OBJECT to be of unit length, storing the result in a new 3-dimensional vector.

Method: normalize ((object vector2))

Normalize the 2-dimensional vector OBJECT to be of unit length, storing the result in a new 2-dimensional vector.

Generic Function: normalize! (object out)
Package
Source
Methods
Method: normalize! ((object quaternion) (out quaternion))

Normalize the quaternion OBJECT to be of unit length, storing the result in the quaternion OUT.

Method: normalize! ((object vector4) (out vector4))

Normalize the 4-dimensional vector OBJECT to be of unit length, storing the result in the 4-dimensional vector OUT.

Method: normalize! ((object vector3) (out vector3))

Normalize the 3-dimensional vector OBJECT to be of unit length, storing the result in the 3-dimensional vector OUT.

Method: normalize! ((object vector2) (out vector2))

Normalize the 2-dimensional vector OBJECT to be of unit length, storing the result in the 2-dimensional vector OUT.

Generic Function: normalize-rotation (matrix)
Package
Source
Methods
Method: normalize-rotation ((matrix matrix4))

Normalize each of the rotation axes of the 4x4 matrix MATRIX to be of unit length, storing the result in a new 4x4 matrix.

Method: normalize-rotation ((matrix matrix3))

Normalize each of the rotation axes of the 3x3 matrix MATRIX to be of unit length, storing the result in a new 3x3 matrix.

Method: normalize-rotation ((matrix matrix2))

Normalize each of the rotation axes of the 2x2 matrix MATRIX to be of unit length, storing the result in a new 2x2 matrix.

Generic Function: normalize-rotation! (matrix out)
Package
Source
Methods
Method: normalize-rotation! ((matrix matrix4) (out matrix4))

Normalize each of the rotation axes of the 4x4 matrix MATRIX to be of unit length, storing the result in the 4x4 matrix OUT.

Method: normalize-rotation! ((matrix matrix3) (out matrix3))

Normalize each of the rotation axes of the 3x3 matrix MATRIX to be of unit length, storing the result in the 3x3 matrix OUT.

Method: normalize-rotation! ((matrix matrix2) (out matrix2))

Normalize each of the rotation axes of the 2x2 matrix MATRIX to be of unit length, storing the result in the 2x2 matrix OUT.

Generic Function: ones (vector)
Package
Source
Methods
Method: ones ((vector vector4))

Construct a new vector from the 4-dimensional vector VECTOR with each of its components set to one.

Method: ones ((vector vector3))

Construct a new vector from the 3-dimensional vector VECTOR with each of its components set to one.

Method: ones ((vector vector2))

Construct a new vector from the 2-dimensional vector VECTOR with each of its components set to one.

Generic Function: ones! (vector)
Package
Source
Methods
Method: ones! ((vector vector4))

Modify the 4-dimensional vector VECTOR to have each of its components set to one.

Method: ones! ((vector vector3))

Modify the 3-dimensional vector VECTOR to have each of its components set to one.

Method: ones! ((vector vector2))

Modify the 2-dimensional vector VECTOR to have each of its components set to one.

Generic Function: orient! (space out &rest axes/angles)
Package
Source
Methods
Method: orient! (space (out quaternion) &rest axes/angles)

Construct a quaternion representing a series of rotations around the axes and angles given, storing the result in the quaternion OUT. AXES/ANGLES are pairs of axes and angles, with an axis being either one of the symbols :X, :Y, or :Z, or a 3-dimensional vector representing an arbitrary axis, and angle being any real number representing the angle in radians around its paired axis.

Generic Function: ortho (left right bottom top near far)
Package
Source
Methods
Method: ortho ((left real) (right real) (bottom real) (top real) (near real) (far real))

Construct an orthographic projection matrix, storing the result in a new 4x4 matrix.

Generic Function: ortho! (left right bottom top near far out)
Package
Source
Methods
Method: ortho! ((left real) (right real) (bottom real) (top real) (near real) (far real) (out matrix4))

Modify the 4x4 matrix matrix to be an orthographic projection matrix.

Generic Function: orthogonal? (matrix)
Package
Source
Methods
Method: orthogonal? ((matrix matrix4))

Check whether the 4x4 matrix MATRIX is orthogonal.

Method: orthogonal? ((matrix matrix3))

Check whether the 3x3 matrix MATRIX is orthogonal.

Method: orthogonal? ((matrix matrix2))

Check whether the 2x2 matrix MATRIX is orthogonal.

Generic Function: orthonormalize (matrix)
Package
Source
Methods
Method: orthonormalize ((matrix matrix4))

Normalize the rotation sub-matrix of the 4x4 matrix MATRIX using the Gram-Schmidt process, storing the result in a new 4x4 matrix.

Method: orthonormalize ((matrix matrix3))

Normalize the rotation sub-matrix of the 3x3 matrix MATRIX using the Gram-Schmidt process, storing the result in a new 3x3 matrix.

Generic Function: orthonormalize! (matrix out)
Package
Source
Methods
Method: orthonormalize! ((matrix matrix4) (out matrix4))

Normalize the rotation sub-matrix of the 4x4 matrix MATRIX using the Gram-Schmidt process, storing the result in the 4x4 matrix OUT.

Method: orthonormalize! ((matrix matrix3) (out matrix3))

Normalize the rotation sub-matrix of the 3x3 matrix MATRIX using the Gram-Schmidt process, storing the result in the 3x3 matrix OUT.

Generic Function: parallel? (vector1 vector2)
Package
Source
Methods
Method: parallel? ((vector1 vector4) (vector2 vector4))

Check whether the 4-dimensional vectors VECTOR1 and VECTOR2 are parallel to each other.

Method: parallel? ((vector1 vector3) (vector2 vector3))

Check whether the 3-dimensional vectors VECTOR1 and VECTOR2 are parallel to each other.

Method: parallel? ((vector1 vector2) (vector2 vector2))

Check whether the 2-dimensional vectors VECTOR1 and VECTOR2 are parallel to each other.

Generic Function: perspective (fov aspect near far)
Package
Source
Methods
Method: perspective ((fov real) (aspect real) (near real) (far real))

Construct a perspective projection matrix, storing the result in a new 4x4 matrix.

Generic Function: perspective! (fov aspect near far out)
Package
Source
Methods
Method: perspective! ((fov real) (aspect real) (near real) (far real) (out matrix4))

Modify the 4x4 matrix OUT to be a perspective projection matrix.

Package
Source
Methods

Convert each component of the 4-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in a new 4-dimensional vector.

Convert each component of the 3-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in a new 3-dimensional vector.

Convert each component of the 2-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in a new 2-dimensional vector.

Package
Source
Methods
Method: radians->degrees! ((vector vector4) (out vector4))

Convert each component of the 4-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in the 4-dimensional vector OUT.

Method: radians->degrees! ((vector vector3) (out vector3))

Convert each component of the 3-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in the 3-dimensional vector OUT.

Method: radians->degrees! ((vector vector2) (out vector2))

Convert each component of the 2-dimensional vector VECTOR, which are assumed to be in radians, to to degrees, storing the result in the 2-dimensional vector OUT.

Generic Function: random! (object &key min max)
Package
Source
Methods
Method: random! ((object matrix4) &key min max)

Set each component of the 4x4 matrix OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Method: random! ((object matrix3) &key min max)

Set each component of the 3x3 matrix OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Method: random! ((object matrix2) &key min max)

Set each component of the 2x2 matrix OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Method: random! ((object vector4) &key min max)

Set each component of the 4-dimensional vector OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Method: random! ((object vector3) &key min max)

Set each component of the 3-dimensional vector OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Method: random! ((object vector2) &key min max)

Set each component of the 2-dimensional vector OBJECT to a random value bounded by the scalars MIN and MAX, storing the result back into OBJECT.

Generic Function: rotate (object1 object2 &key space)
Package
Source
Methods
Method: rotate ((object1 quaternion) (object2 vector3) &key space)

Rotate the quaternion OBJECT1 by the 3-dimensional vector OBJECT2 denoting Euler angles in radians, storing the result in a new quaternion. If SPACE is :WORLD instead of the default of :LOCAL, the inverse rotation is performed.

Source
Method: rotate ((object1 quaternion) (object2 quaternion) &key space)

Perform a quaternion rotation by multiplying the quaternion OBJECT1 by the quaternion OBJECT2, storing the result in a new quaternion. If SPACE is :WORLD instead of the default of :LOCAL, OBJECT2 is multiplied by OBJECT1.

Source
Method: rotate ((object1 matrix4) (object2 vector3) &key space)

Perform a matrix rotation by multiplying the 4x4 matrix OBJECT by a a series of rotation matrices around each of the axes and angles in radians denoted by the 3-dimensional vector OBJECT2, storing the result in a new 4x4 matrix. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrices are multiplying by OBJECT1.

Source
Method: rotate ((object1 matrix3) (object2 real) &key space)

Perform a matrix rotation by multiplying the 3x3 matrix OBJECT by a rotation matrix that denotes a rotation around the Z axis by an angle in radians of OBJECT2, storing the result in a new 3x3 matrix. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrix is multiplying by OBJECT2.

Source
Method: rotate ((object1 matrix2) (object2 real) &key space)

Perform a matrix rotation by multiplying the 2x2 matrix OBJECT by a rotation matrix that denotes a rotation around the Z axis by an angle in radians of OBJECT2, storing the result in a new 2x2 matrix. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrix is multiplying by OBJECT2.

Source
Generic Function: rotate! (object1 object2 out &key space)
Package
Source
Methods
Method: rotate! ((object1 quaternion) (object2 vector3) (out quaternion) &key space)

Rotate the quaternion OBJECT1 by the 3-dimensional vector OBJECT2 denoting Euler angles in radians, storing the result in the quaternion OUT. If SPACE is :WORLD instead of the default of :LOCAL, the inverse rotation is performed.

Source
Method: rotate! ((object1 quaternion) (object2 quaternion) (out quaternion) &key space)

Perform a quaternion rotation by multiplying the quaternion OBJECT1 by the quaternion OBJECT2, storing the result in the quaternion OUT. If SPACE is :WORLD instead of the default of :LOCAL, OBJECT2 is multiplied by OBJECT1.

Source
Method: rotate! ((object1 matrix4) (object2 vector3) (out matrix4) &key space)

Perform a matrix rotation by multiplying the 4x4 matrix OBJECT by a a series of rotation matrices around each of the axes and angles in radians denoted by the 3-dimensional vector OBJECT2, storing the result in the 4x4 matrix OUT. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrices are multiplying by OBJECT1.

Source
Method: rotate! ((object1 matrix3) (object2 real) (out matrix3) &key space)

Perform a matrix rotation by multiplying the 3x3 matrix OBJECT by a rotation matrix that denotes a rotation around the Z axis by an angle in radians of OBJECT2, storing the result in the 3x3 matrix OUT. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrix is multiplying by OBJECT2.

Source
Method: rotate! ((object1 matrix2) (object2 real) (out matrix2) &key space)

Perform a matrix rotation by multiplying the 2x2 matrix OBJECT by a rotation matrix that denotes a rotation around the Z axis by an angle in radians of OBJECT2, storing the result in the 2x2 matrix OUT. If SPACE is :WORLD instead of the default of :LOCAL, the rotation matrix is multiplying by OBJECT2.

Source
Generic Function: rotation/x! (out angle)
Package
Source
Methods
Method: rotation/x! ((out matrix4) (angle real))

Modify the 4x4 matrix OUT to represent a rotation around the X axis by ANGLE radians.

Method: rotation/x! ((out matrix3) (angle real))

Modify the 3x3 matrix OUT to represent a rotation around the X axis by ANGLE radians.

Generic Function: rotation/y! (matrix angle)
Package
Source
Methods
Method: rotation/y! ((matrix matrix4) (angle real))

Modify the {OUT:DESC} OUT to represent a rotation around the Y axis by ANGLE radians.

Method: rotation/y! ((matrix matrix3) (angle real))

Modify the {OUT:DESC} OUT to represent a rotation around the Y axis by ANGLE radians.

Generic Function: rotation/z! (matrix angle)
Package
Source
Methods
Method: rotation/z! ((matrix matrix4) (angle real))

Modify the {OUT:DESC} OUT to represent a rotation around the Z axis by ANGLE radians.

Method: rotation/z! ((matrix matrix3) (angle real))

Modify the {OUT:DESC} OUT to represent a rotation around the Z axis by ANGLE radians.

Method: rotation/z! ((matrix matrix2) (angle real))

Modify the {OUT:DESC} OUT to represent a rotation around the Z axis by ANGLE radians.

Generic Function: round (vector)
Package
Source
Methods
Method: round ((vector vector4))

Round each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: round ((vector vector3))

Round each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: round ((vector vector2))

Round each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: round! (vector out)
Package
Source
Methods
Method: round! ((vector vector4) (out vector4))

Round each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: round! ((vector vector3) (out vector3))

Round each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: round! ((vector vector2) (out vector2))

Round each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: same-direction? (vector1 vector2)
Package
Source
Methods
Method: same-direction? ((vector1 vector4) (vector2 vector4))

Check if the 4-dimensional vectors VECTOR1 and VECTOR2 have the same direction.

Method: same-direction? ((vector1 vector3) (vector2 vector3))

Check if the 3-dimensional vectors VECTOR1 and VECTOR2 have the same direction.

Method: same-direction? ((vector1 vector2) (vector2 vector2))

Check if the 2-dimensional vectors VECTOR1 and VECTOR2 have the same direction.

Generic Function: scale (matrix vector)
Package
Source
Methods
Method: scale ((matrix matrix4) (vector vector3))

Scale the 4x4 matrix MATRIX, by the 3-dimensional vector VECTOR, storing the result in a new 4x4 matrix.

Method: scale ((matrix matrix3) (vector vector2))

Scale the 3x3 matrix MATRIX, by the 2-dimensional vector VECTOR, storing the result in a new 3x3 matrix.

Method: scale ((matrix matrix2) (vector vector2))

Scale the 2x2 matrix MATRIX, by the 2-dimensional vector VECTOR, storing the result in a new 2x2 matrix.

Generic Function: scale! (matrix vector out)
Package
Source
Methods
Method: scale! ((matrix matrix4) (vector vector3) (out matrix4))

Scale the 4x4 matrix MATRIX, by the 3-dimensional vector VECTOR, storing the result in the 4x4 matrix OUT.

Method: scale! ((matrix matrix3) (vector vector2) (out matrix3))

Scale the 3x3 matrix MATRIX, by the 2-dimensional vector VECTOR, storing the result in the 3x3 matrix OUT.

Method: scale! ((matrix matrix2) (vector vector2) (out matrix2))

Scale the 2x2 matrix MATRIX, by the 2-dimensional vector VECTOR, storing the result in the 2x2 matrix OUT.

Generic Function: set-axis (matrix vector axis)
Package
Source
Methods
Method: set-axis ((matrix matrix4) (vector vector3) (axis (eql :z)))

Set the Z axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-axis ((matrix matrix4) (vector vector3) (axis (eql :y)))

Set the Y axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-axis ((matrix matrix4) (vector vector3) (axis (eql :x)))

Set the X axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-axis ((matrix matrix3) (vector vector2) (axis (eql :y)))

Set the Y axis of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-axis ((matrix matrix3) (vector vector2) (axis (eql :x)))

Set the X axis of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-axis ((matrix matrix2) (vector vector2) (axis (eql :y)))

Set the Y axis of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Method: set-axis ((matrix matrix2) (vector vector2) (axis (eql :x)))

Set the X axis of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Generic Function: set-axis! (matrix vector axis out)
Package
Methods
Method: set-axis! ((matrix matrix4) (vector vector3) (axis (eql :z)) (out matrix4))

Set the Z axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Source
Method: set-axis! ((matrix matrix4) (vector vector3) (axis (eql :y)) (out matrix4))

Set the Y axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Source
Method: set-axis! ((matrix matrix4) (vector vector3) (axis (eql :x)) (out matrix4))

Set the X axis of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Source
Method: set-axis! ((matrix matrix3) (vector vector2) (axis (eql :y)) (out matrix3))

Set the Y axis of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Source
Method: set-axis! ((matrix matrix3) (vector vector2) (axis (eql :x)) (out matrix3))

Set the X axis of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Source
Method: set-axis! ((matrix matrix2) (vector vector2) (axis (eql :y)) (out matrix2))

Set the Y axis of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Source
Method: set-axis! ((matrix matrix2) (vector vector2) (axis (eql :x)) (out matrix2))

Set the X axis of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Source
Generic Function: set-column (matrix column index)
Package
Source
Methods
Method: set-column ((matrix matrix4) (column vector4) (index (eql 3)))

Set the 3rd column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-column ((matrix matrix4) (column vector4) (index (eql 2)))

Set the 2nd column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-column ((matrix matrix3) (column vector3) (index (eql 2)))

Set the 2nd column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-column ((matrix matrix4) (column vector4) (index (eql 1)))

Set the 1st column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-column ((matrix matrix4) (column vector4) (index (eql 0)))

Set the 0th column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-column ((matrix matrix3) (column vector3) (index (eql 1)))

Set the 1st column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-column ((matrix matrix3) (column vector3) (index (eql 0)))

Set the 0th column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-column ((matrix matrix2) (column vector2) (index (eql 1)))

Set the 1st column of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Method: set-column ((matrix matrix2) (column vector2) (index (eql 0)))

Set the 0th column of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Generic Function: set-column! (matrix column index out)
Package
Source
Methods
Method: set-column! ((matrix matrix4) (column vector4) (index (eql 3)) (out matrix4))

Set the 3rd column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-column! ((matrix matrix4) (column vector4) (index (eql 2)) (out matrix4))

Set the 2nd column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-column! ((matrix matrix3) (column vector3) (index (eql 2)) (out matrix3))

Set the 2nd column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Method: set-column! ((matrix matrix4) (column vector4) (index (eql 1)) (out matrix4))

Set the 1st column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-column! ((matrix matrix4) (column vector4) (index (eql 0)) (out matrix4))

Set the 0th column of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-column! ((matrix matrix3) (column vector3) (index (eql 1)) (out matrix3))

Set the 1st column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Method: set-column! ((matrix matrix3) (column vector3) (index (eql 0)) (out matrix3))

Set the 0th column of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Method: set-column! ((matrix matrix2) (column vector2) (index (eql 1)) (out matrix2))

Set the 1st column of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Method: set-column! ((matrix matrix2) (column vector2) (index (eql 0)) (out matrix2))

Set the 0th column of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector COLUMN into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Generic Function: set-diagonal (matrix vector)
Package
Source
Methods
Method: set-diagonal ((matrix matrix4) (vector vector4))

Set the diagonal of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-diagonal ((matrix matrix3) (vector vector3))

Set the diagonal of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-diagonal ((matrix matrix2) (vector vector2))

Set the diagonal of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Generic Function: set-diagonal! (matrix vector out)
Package
Source
Methods
Method: set-diagonal! ((matrix matrix4) (vector vector4) (out matrix4))

Set the diagonal of the 4x4 matrix MATRIX, by copying the components of the 4-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-diagonal! ((matrix matrix3) (vector vector3) (out matrix3))

Set the diagonal of the 3x3 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Method: set-diagonal! ((matrix matrix2) (vector vector2) (out matrix2))

Set the diagonal of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Generic Function: set-scale (matrix vector)
Package
Source
Methods
Method: set-scale ((matrix matrix4) (vector vector3))

Set the scale of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 4x4 matrix.

Method: set-scale ((matrix matrix3) (vector vector2))

Set the scale of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 3x3 matrix.

Method: set-scale ((matrix matrix2) (vector vector2))

Set the scale of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in a new 2x2 matrix.

Generic Function: set-scale! (matrix vector out)
Package
Source
Methods
Method: set-scale! ((matrix matrix4) (vector vector3) (out matrix4))

Set the scale of the 4x4 matrix MATRIX, by copying the components of the 3-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 4x4 matrix OUT.

Method: set-scale! ((matrix matrix3) (vector vector2) (out matrix3))

Set the scale of the 3x3 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 3x3 matrix OUT.

Method: set-scale! ((matrix matrix2) (vector vector2) (out matrix2))

Set the scale of the 2x2 matrix MATRIX, by copying the components of the 2-dimensional vector VECTOR into the corresponding locations of the matrix, storing the result in the 2x2 matrix OUT.

Generic Function: set-translation (matrix vector)
Package
Source
Methods
Method: set-translation ((matrix matrix4) (vector vector3))

Set the translation of the 4x4 matrix MATRIX from the 3-dimensional vector VECTOR, storing the result in a new 4x4 matrix.

Method: set-translation ((matrix matrix3) (vector vector2))

Set the translation of the 3x3 matrix MATRIX from the 2-dimensional vector VECTOR, storing the result in a new 3x3 matrix.

Generic Function: set-translation! (matrix vector out)
Package
Source
Methods
Method: set-translation! ((matrix matrix4) (vector vector3) (out matrix4))

Set the translation of the 4x4 matrix MATRIX from the 3-dimensional vector VECTOR, storing the result in the 4x4 matrix OUT.

Method: set-translation! ((matrix matrix3) (vector vector2) (out matrix3))

Set the translation of the 3x3 matrix MATRIX from the 2-dimensional vector VECTOR, storing the result in the 3x3 matrix OUT.

Generic Function: sign (vector)
Package
Source
Methods
Method: sign ((vector vector4))

Take the sign of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector. All values less than 0 become -1, and all values greater than 0 become +1.

Method: sign ((vector vector3))

Take the sign of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector. All values less than 0 become -1, and all values greater than 0 become +1.

Method: sign ((vector vector2))

Take the sign of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector. All values less than 0 become -1, and all values greater than 0 become +1.

Generic Function: sign! (vector out)
Package
Source
Methods
Method: sign! ((vector vector4) (out vector4))

Take the sign of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT. All values less than 0 become -1, and all values greater than 0 become +1.

Method: sign! ((vector vector3) (out vector3))

Take the sign of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT. All values less than 0 become -1, and all values greater than 0 become +1.

Method: sign! ((vector vector2) (out vector2))

Take the sign of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT. All values less than 0 become -1, and all values greater than 0 become +1.

Generic Function: sin (vector)
Package
Source
Methods
Method: sin ((vector vector4))

Compute the trigonometric sine of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: sin ((vector vector3))

Compute the trigonometric sine of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: sin ((vector vector2))

Compute the trigonometric sine of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: sin! (vector out)
Package
Source
Methods
Method: sin! ((vector vector4) (out vector4))

Compute the trigonometric sine of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: sin! ((vector vector3) (out vector3))

Compute the trigonometric sine of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: sin! ((vector vector2) (out vector2))

Compute the trigonometric sine of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: slerp (quaternion1 quaternion2 parameter)
Package
Source
Methods
Method: slerp ((quaternion1 quaternion) (quaternion2 quaternion) (parameter real))

Perform a spherical linear interpolation between the quaternions QUATERNION1 and QUATERNION2 by the parameter PARAMETER, storing the result in a new quaternion.

Generic Function: slerp! (quaternion1 quaternion2 parameter out)
Package
Source
Methods
Method: slerp! ((quaternion1 quaternion) (quaternion2 quaternion) (parameter real) (out quaternion))

Perform a spherical linear interpolation between the quaternions QUATERNION1 and QUATERNION2 by the parameter PARAMETER, storing the result in the quaternion OUT.

Generic Function: sqrt (vector)
Package
Source
Methods
Method: sqrt ((vector vector4))

Compute the square root of each component in the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: sqrt ((vector vector3))

Compute the square root of each component in the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: sqrt ((vector vector2))

Compute the square root of each component in the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: sqrt! (vector out)
Package
Source
Methods
Method: sqrt! ((vector vector4) (out vector4))

Compute the square root of each component in the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: sqrt! ((vector vector3) (out vector3))

Compute the square root of each component in the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: sqrt! ((vector vector2) (out vector2))

Compute the square root of each component in the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: tan (vector)
Package
Source
Methods
Method: tan ((vector vector4))

Compute the trigonometric tangent of each component of the 4-dimensional vector VECTOR, storing the result in a new 4-dimensional vector.

Method: tan ((vector vector3))

Compute the trigonometric tangent of each component of the 3-dimensional vector VECTOR, storing the result in a new 3-dimensional vector.

Method: tan ((vector vector2))

Compute the trigonometric tangent of each component of the 2-dimensional vector VECTOR, storing the result in a new 2-dimensional vector.

Generic Function: tan! (vector out)
Package
Source
Methods
Method: tan! ((vector vector4) (out vector4))

Compute the trigonometric tangent of each component of the 4-dimensional vector VECTOR, storing the result in the 4-dimensional vector OUT.

Method: tan! ((vector vector3) (out vector3))

Compute the trigonometric tangent of each component of the 3-dimensional vector VECTOR, storing the result in the 3-dimensional vector OUT.

Method: tan! ((vector vector2) (out vector2))

Compute the trigonometric tangent of each component of the 2-dimensional vector VECTOR, storing the result in the 2-dimensional vector OUT.

Generic Function: to-array (object element-type)
Package
Source
Methods
Method: to-array ((object vector2) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 2-dimensional vector OBJECT.

Method: to-array ((object vector3) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 3-dimensional vector OBJECT.

Method: to-array ((object vector4) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 4-dimensional vector OBJECT.

Method: to-array ((object matrix2) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 2x2 matrix OBJECT.

Method: to-array ((object matrix3) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 3x3 matrix OBJECT.

Method: to-array ((object matrix4) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the 4x4 matrix OBJECT.

Method: to-array ((object quaternion) (element-type (eql :double-float)))

Construct a freshly-allocated 1-dimensional array of double-floats from the components of the quaternion OBJECT.

Method: to-array ((object vector2) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 2-dimensional vector OBJECT.

Method: to-array ((object vector3) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 3-dimensional vector OBJECT.

Method: to-array ((object vector4) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 4-dimensional vector OBJECT.

Method: to-array ((object matrix2) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 2x2 matrix OBJECT.

Method: to-array ((object matrix3) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 3x3 matrix OBJECT.

Method: to-array ((object matrix4) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the 4x4 matrix OBJECT.

Method: to-array ((object quaternion) (element-type (eql :single-float)))

Construct a freshly-allocated 1-dimensional array of single-floats from the components of the quaternion OBJECT.

Generic Function: to-array! (object element-type)
Package
Source
Methods
Method: to-array! ((object vector2) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 2-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object vector3) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 3-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object vector4) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 4-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix2) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 2x2 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix3) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 3x3 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix4) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the 4x4 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object quaternion) (element-type (eql :double-float)))

Get a reference to a 1-dimensional array of double-floats containing the components of the quaternion OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object vector2) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 2-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object vector3) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 3-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object vector4) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 4-dimensional vector OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix2) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 2x2 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix3) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 3x3 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object matrix4) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the 4x4 matrix OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Method: to-array! ((object quaternion) (element-type (eql :single-float)))

Get a reference to a 1-dimensional array of single-floats containing the components of the quaternion OBJECT.

NOTE: This object is not freshly-allocated and should not be stored. Its memory will be overwritten on subsequent calls to either TO-ARRAY or TO-ARRAY!. It is intended to be used for once-off operations, such as uploading of GPU uniform variables.

Generic Function: to-euler-angles (quaternion)
Package
Source
Methods
Method: to-euler-angles ((quaternion quaternion))

Convert the quaternion QUATERNION to a 3-dimensional vector of Euler angles in radians, storing the result in a new 3-dimensional vector.

Generic Function: to-euler-angles! (quaternion out)
Package
Source
Methods
Method: to-euler-angles! ((quaternion quaternion) (out vector3))

Convert the quaternion QUATERNION to a 3-dimensional vector of Euler angles in radians, storing the result in the 3-dimensional vector OUT..

Generic Function: to-matrix3 (quaternion)
Package
Source
Methods
Method: to-matrix3 ((quaternion quaternion))

Convert the quaternion QUATERNION to a 3x3 matrix. storing the result in a new 3x3 matrix.

Generic Function: to-matrix3! (quaternion out)
Package
Source
Methods
Method: to-matrix3! ((quaternion quaternion) (out matrix3))

Convert the quaternion QUATERNION to a 3x3 matrix. storing the result in a the 3x3 matrix OUT.

Generic Function: to-matrix4 (quaternion)
Package
Source
Methods
Method: to-matrix4 ((quaternion quaternion))

Convert the quaternion QUATERNION to a 4x4 matrix. storing the result in a new 4x4 matrix.

Generic Function: to-matrix4! (quaternion out)
Package
Source
Methods
Method: to-matrix4! ((quaternion quaternion) (out matrix4))

Convert the quaternion QUATERNION to a 4x4 matrix. storing the result in a the 4x4 matrix OUT.

Generic Function: trace (matrix)
Package
Source
Methods
Method: trace ((matrix matrix4))

Compute the trace of the 4x4 matrix, producing a scalar value.

Method: trace ((matrix matrix3))

Compute the trace of the 3x3 matrix, producing a scalar value.

Method: trace ((matrix matrix2))

Compute the trace of the 2x2 matrix, producing a scalar value.

Generic Function: translate (matrix vector)
Package
Source
Methods
Method: translate ((matrix matrix4) (vector vector3))

Translate the 4x4 matrix MATRIX by the 3-dimensional vector VECTOR, storing the result in a new 4x4 matrix.

Method: translate ((matrix matrix3) (vector vector2))

Translate the 3x3 matrix MATRIX by the 2-dimensional vector VECTOR, storing the result in a new 3x3 matrix.

Generic Function: translate! (matrix vector out)
Package
Methods
Method: translate! ((matrix matrix4) (vector vector3) (out matrix4))

Translate the 4x4 matrix MATRIX by the 3-dimensional vector VECTOR, storing the result in the 4x4 matrix OUT.

Source
Method: translate! ((matrix matrix3) (vector vector2) (out matrix3))

Translate the 3x3 matrix MATRIX by the 2-dimensional vector VECTOR, storing the result in the 3x3 matrix OUT.

Source
Generic Function: transpose (matrix)
Package
Source
Methods
Method: transpose ((matrix matrix4))

Transpose the rows and columns of the 4x4 matrix MATRIX, storing the result in a new 4x4 matrix.

Method: transpose ((matrix matrix3))

Transpose the rows and columns of the 3x3 matrix MATRIX, storing the result in a new 3x3 matrix.

Method: transpose ((matrix matrix2))

Transpose the rows and columns of the 2x2 matrix MATRIX, storing the result in a new 2x2 matrix.

Generic Function: transpose! (matrix out)
Package
Source
Methods
Method: transpose! ((matrix matrix4) (out matrix4))

Transpose the rows and columns of the 4x4 matrix MATRIX, storing the result in the 4x4 matrix.

Method: transpose! ((matrix matrix3) (out matrix3))

Transpose the rows and columns of the 3x3 matrix MATRIX, storing the result in the 3x3 matrix.

Method: transpose! ((matrix matrix2) (out matrix2))

Transpose the rows and columns of the 2x2 matrix MATRIX, storing the result in the 2x2 matrix.

Generic Function: velocity! (axis rate out)
Package
Source
Methods
Method: velocity! ((axis vector4) (rate real) (out vector4))

Modify the 4-dimensional vector OUT, to represent a velocity following the right-hand rule, with a direction parallel to the 4-dimensional vector AXIS, and a magnitude of RATE units per second.

Method: velocity! ((axis vector3) (rate real) (out vector3))

Modify the 3-dimensional vector OUT, to represent a velocity following the right-hand rule, with a direction parallel to the 3-dimensional vector AXIS, and a magnitude of RATE units per second.

Method: velocity! ((axis vector2) (rate real) (out vector2))

Modify the 2-dimensional vector OUT, to represent a velocity following the right-hand rule, with a direction parallel to the 2-dimensional vector AXIS, and a magnitude of RATE units per second.

Generic Function: w (object)
Package
Source
Methods
Method: w ((object quaternion))

Get the W component of the given quaternion.

Source
Method: w ((object vector4))

Get the W component of the given 4-dimensional vector.

Source
Generic Function: (setf w) (object)
Package
Source
Methods
Method: (setf w) ((object quaternion))

Set the W component of the given quaternion.

Source
Method: (setf w) ((object vector4))

Set the W component of the given 4-dimensional vector.

Source
Generic Function: x (object)
Package
Source
Methods
Method: x ((object quaternion))

Get the X component of the given quaternion.

Source
Method: x ((object vector4))

Get the X component of the given 4-dimensional vector.

Source
Method: x ((object vector3))

Get the X component of the given 3-dimensional vector.

Source
Method: x ((object vector2))

Get the X component of the given 2-dimensional vector.

Source
Generic Function: (setf x) (object)
Package
Source
Methods
Method: (setf x) ((object quaternion))

Set the X component of the given quaternion.

Source
Method: (setf x) ((object vector4))

Set the X component of the given 4-dimensional vector.

Source
Method: (setf x) ((object vector3))

Set the X component of the given 3-dimensional vector.

Source
Method: (setf x) ((object vector2))

Set the X component of the given 2-dimensional vector.

Source
Generic Function: y (object)
Package
Source
Methods
Method: y ((object quaternion))

Get the Y component of the given quaternion.

Source
Method: y ((object vector4))

Get the Y component of the given 4-dimensional vector.

Source
Method: y ((object vector3))

Get the Y component of the given 3-dimensional vector.

Source
Method: y ((object vector2))

Get the Y component of the given 2-dimensional vector.

Source
Generic Function: (setf y) (object)
Package
Source
Methods
Method: (setf y) ((object quaternion))

Set the Y component of the given quaternion.

Source
Method: (setf y) ((object vector4))

Set the Y component of the given 4-dimensional vector.

Source
Method: (setf y) ((object vector3))

Set the Y component of the given 3-dimensional vector.

Source
Method: (setf y) ((object vector2))

Set the Y component of the given 2-dimensional vector.

Source
Generic Function: z (object)
Package
Source
Methods
Method: z ((object quaternion))

Get the Z component of the given quaternion.

Source
Method: z ((object vector4))

Get the Z component of the given 4-dimensional vector.

Source
Method: z ((object vector3))

Get the Z component of the given 3-dimensional vector.

Source
Generic Function: (setf z) (object)
Package
Source
Methods
Method: (setf z) ((object quaternion))

Set the Z component of the given quaternion.

Source
Method: (setf z) ((object vector4))

Set the Z component of the given 4-dimensional vector.

Source
Method: (setf z) ((object vector3))

Set the Z component of the given 3-dimensional vector.

Source
Generic Function: zero (object)
Package
Source
Methods
Method: zero ((object matrix4))

Construct a fresh 4x4 matrix with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Method: zero ((object matrix3))

Construct a fresh 3x3 matrix with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Method: zero ((object matrix2))

Construct a fresh 2x2 matrix with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Method: zero ((object vector4))

Construct a fresh 4-dimensional vector with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Method: zero ((object vector3))

Construct a fresh 3-dimensional vector with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Method: zero ((object vector2))

Construct a fresh 2-dimensional vector with every component set to zero. This is a convenience function that is useful when you already have a reference an object to construct a new type from.

Generic Function: zero! (object)
Package
Source
Methods
Method: zero! ((object matrix4))

Set each component of the 4x4 matrix OBJECT to zero, storing the result back into OBJECT.

Method: zero! ((object matrix3))

Set each component of the 3x3 matrix OBJECT to zero, storing the result back into OBJECT.

Method: zero! ((object matrix2))

Set each component of the 2x2 matrix OBJECT to zero, storing the result back into OBJECT.

Method: zero! ((object vector4))

Set each component of the 4-dimensional vector OBJECT to zero, storing the result back into OBJECT.

Method: zero! ((object vector3))

Set each component of the 3-dimensional vector OBJECT to zero, storing the result back into OBJECT.

Method: zero! ((object vector2))

Set each component of the 2-dimensional vector OBJECT to zero, storing the result back into OBJECT.

Generic Function: zero? (object)
Package
Source
Methods
Method: zero? ((object matrix4))

Check if every component of the 4x4 matrix OBJECT is zero.

Method: zero? ((object matrix3))

Check if every component of the 3x3 matrix OBJECT is zero.

Method: zero? ((object matrix2))

Check if every component of the 2x2 matrix OBJECT is zero.

Method: zero? ((object vector4))

Check if every component of the 4-dimensional vector OBJECT is zero.

Method: zero? ((object vector3))

Check if every component of the 3-dimensional vector OBJECT is zero.

Method: zero? ((object vector2))

Check if every component of the 2-dimensional vector OBJECT is zero.

#### 5.1.6 Standalone methods

Method: make-load-form ((object math-object) &optional environment)
Source
Method: print-object ((matrix matrix) stream)
Source
Method: print-object ((vector vector) stream)
Source
Method: print-object ((quaternion quaternion) stream)
Source

#### 5.1.7 Classes

Class: math-object

The base type that all math types are derived from.

Package
Source
Direct subclasses
Direct methods
Direct slots
Slot: %components
Type

(mfiano-utils:f64a (*))

Initargs

:components

Writers
Slot: %components/single
Type

(mfiano-utils:f32a (*))

Initargs

:components/single

Writers
Slot: %row-count
Type

(integer 1 4)

Initargs

:row-count

Writers

Slot: %column-count
Type

(integer 1 4)

Initargs

:column-count

Writers

Class: matrix

A square matrix that all matrix types are derived from.

Package
Source
Direct superclasses
Direct subclasses
Direct methods
Class: matrix2

A 2x2 matrix representing a 2-dimensional rotation.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count2
:column-count2
:components(make-f64-array 4)
:components/single(make-f32-array 4)
Class: matrix3

A 3x3 matrix representing either a 2-dimensional transformation or a 3-dimensional rotation.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count3
:column-count3
:components(make-f64-array 9)
:components/single(make-f32-array 9)
Class: matrix4

A 4x4 matrix representing a 3-dimensional transformation.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count4
:column-count4
:components(make-f64-array 16)
:components/single(make-f32-array 16)
Class: quaternion

A quaternion representing a 3-dimensional rotation.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count1
:column-count4
:components(make-f64-array 4)
:components/single(make-f32-array 4)
Class: vector

A column vector that all vector types are derived from.

Package
Source
Direct superclasses
Direct subclasses
Direct methods
Class: vector2

A 2-dimensional column vector.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count2
:column-count1
:components(make-f64-array 2)
:components/single(make-f32-array 2)
Class: vector3

A 3-dimensional column vector.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count3
:column-count1
:components(make-f64-array 3)
:components/single(make-f32-array 3)
Class: vector4

A 4-dimensional column vector.

Package
Source
Direct superclasses
Direct methods
Direct Default Initargs
InitargValue
:row-count4
:column-count1
:components(make-f64-array 4)
:components/single(make-f32-array 4)

### 5.2 Internals

Next: , Previous: , Up: Internals   [Contents][Index]

#### 5.2.1 Special variables

Special Variable: *axis-length->vector*
Package
Source
Special Variable: *columns->vector*
Package
Source
Special Variable: *descriptions*
Package
Source
Special Variable: *matrix->rotation*
Package
Source
Special Variable: *rows->vector*
Package
Source
Special Variable: *types*
Package
Source

#### 5.2.2 Macros

Macro: %generate-accessors (type &body component-names)
Package
Source
Macro: %generate-type (type () &key base rows columns description documentation)
Package
Source
Macro: %matrix* (size matrix1 matrix2 out)
Package
Source
Macro: %with-columns ((object index &key limit column-count) &body body)
Package
Source
Macro: %with-components ((specs bindings (&key read-only)) &body body)
Package
Source
Macro: %with-each ((object component index &key from) &body body)
Package
Source
Macro: %with-each/2d ((object component row-index column-index &key row-limit column-limit) &body body)
Package
Source
Macro: %with-each/parallel ((specs &key index from) &body body)
Package
Source
Macro: %with-rows ((object index &key limit row-count) &body body)
Package
Source
Macro: define-op (op lambda-list filter &body body)
Package
Source
Macro: doc (string)
Package
Source

Next: , Previous: , Up: Internals   [Contents][Index]

#### 5.2.3 Ordinary functions

Function: %axis->index (axis)
Package
Source
Function: %filter-types (filter)
Package
Source
Function: %generate-bindings/1d (specs &key quaternion)
Package
Source
Function: %generate-bindings/2d (specs)
Package
Source
Function: %get-column (object out index)
Package
Source
Function: %get-row (object index out)
Package
Source
Function: %index->axis (index)
Package
Source
Function: %invert/generic-4x4 (matrix out)
Package
Source
Function: %make-random (object min max)
Package
Source
Function: %mat/from-vecs (matrix &rest vectors)
Package
Source
Function: %parse-extended-class-specializers (type specs)
Package
Source
Function: %parse-extended-eql-specializers (specs)
Package
Source
Function: %parse-extended-specializers (type required)
Package
Source
Function: %parse-keyword-parameters (parameters)
Package
Source
Function: %parse-optional-parameters (parameters)
Package
Source
Function: %parse-parameters (parameters)
Package
Source
Function: %parse-required-parameters (parameters)
Package
Source
Function: %parse-rest-parameter (parameters)
Package
Source
Function: %parse-specialized-specs (type specs)
Package
Source
Function: %print-object/columnar (object stream)
Package
Source
Function: %print-object/horizontal (object label stream)
Package
Source
Function: %process-documentation (string spec)
Package
Source
Function: %quaternion-to-matrix (quaternion out)
Package
Source
Function: %set-column (object1 object2 out index bound)
Package
Source
Function: ~= (x y &key rel abs)
Package
Source

#### 5.2.4 Generic functions

Package
Methods

Source
Target Slot
Package
Methods

Source
Target Slot
Generic Writer: (setf components) (object)
Package
Methods
Writer Method: (setf components) ((math-object math-object))

automatically generated writer method

Source
Target Slot
Package
Methods

Source
Target Slot
Generic Writer: (setf components/single) (object)
Package
Methods
Writer Method: (setf components/single) ((math-object math-object))

automatically generated writer method

Source
Target Slot