Skip to content
Ramsey Nasser edited this page Dec 18, 2018 · 10 revisions

Syntax

(v2)
(v2 x)
(v2 x y)

Description

Constructs a Vector2.

If called with zero arguments, returns Vector2/one. If called with one argument x returns, a Vector2 with all its coordinates set to x.


Syntax

(v3)
(v3 x)
(v3 x y z)

Description

Constructs a Vector3.

If called with zero arguments, returns Vector3/one. If called with one argument x returns, a Vector3 with all its coordinates set to x.


Syntax

(v4)
(v4 x)
(v4 x y z w)

Description

Constructs a Vector4.

If called with zero arguments, returns Vector4/one. If called with one argument x returns, a Vector4 with all its coordinates set to x.


Syntax

(qt)
(qt a b c d)

Description

Constructs a Quaternion.

If called with zero arguments, returns Quaternion/identity.


Syntax

(v2+ args*)

Description

Adds Vector2s.

If called with zero arguments, returns Vector2/zero. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v3+ args*)

Description

Adds Vector3s.

If called with zero arguments, returns Vector3/zero. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v4+ args*)

Description

Adds Vector4s.

If called with zero arguments, returns Vector4/zero. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v2- args*)

Description

Subtracts Vector2s.

If called with one argument, the negation of that argument is returned; that is, the Vector2 that results from multiplying all the components of the input Vector2 by -1.

Calls to this function will be inlined if possible.


Syntax

(v3- args*)

Description

Subtracts Vector3s.

If called with one argument, the negation of that argument is returned; that is, the Vector3 that results from multiplying all the components of the input Vector3 by -1.

Calls to this function will be inlined if possible.


Syntax

(v4- args*)

Description

Subtracts Vector4s.

If called with one argument, the negation of that argument is returned; that is, the Vector4 that results from multiplying all the components of the input Vector4 by -1.

Calls to this function will be inlined if possible.


Syntax

(v2* args*)

Description

Multiplies a Vector2 by one or more floats. The Vector2 must be the first argument (so the arguments of this function do not commute).

If called with zero arguments, returns Vector2/one. If called with one argument, returns that argument, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v3* args*)

Description

Multiplies a Vector3 by one or more floats. The Vector3 must be the first argument (so the arguments of this function do not commute).

If called with zero arguments, returns Vector3/one. If called with one argument, returns that argument, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v4* args*)

Description

Multiplies a Vector4 by one or more floats. The Vector4 must be the first argument (so the arguments of this function do not commute).

If called with zero arguments, returns Vector4/one. If called with one argument, returns that argument, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v2div args*)

Description

Divides a Vector2 by one or more floats. The Vector2 must be the first argument (so the arguments of this function do not commute).

If called with one Vector2, returns that Vector2 with its components inverted.

Calls to this function will be inlined if possible.


Syntax

(v3div args*)

Description

Divides a Vector3 by one or more floats. The Vector3 must be the first argument (so the arguments of this function do not commute).

If called with one Vector3, returns that Vector3 with its components inverted.

Calls to this function will be inlined if possible.


Syntax

(v4div args*)

Description

Divides a Vector4 by one or more floats. The Vector4 must be the first argument (so the arguments of this function do not commute).

If called with one Vector4, returns that Vector4 with its components inverted.

Calls to this function will be inlined if possible.


Syntax

(qq* args*)

Description

Multiplies one or more Quaternions.

If called with zero arguments, returns Quaternion/identity. If called with one argument, returns that argument.

Calls to this function will be inlined if possible.


Syntax

(qv* args*)

Description

Multiplies a Quaternion by one or more Vector3s. The first argument must be a Quaternion, and the remaining arguments must be Vector3s.

Calls to this function will be inlined if possible.


Syntax

(q* args*)

Description

Multiplies a Quaternion by one or more Vector3s or Quaternions.

Calls to this function will be inlined if possible.


Syntax

(euler v)

Description

Wraps Quaternion/Euler.

Calls to this function will be inlined if possible.


Syntax

(euler-angles q)

Description

Wraps the Quaternion/eulerAngles.

Calls to this function will be inlined if possible.


Syntax

(to-angle-axis q)

Description

Given a Quaternion q, returns a collection containing the angle (float) and axis (Vector3) that represents that Quaternion, as set by the .

Calls to this function will be inlined if possible.


Syntax

(angle-axis angle axis)

Description

Given an angle (float) and an axis (Vector3), constructs a Quarternion, as per Quaternion/AngleAxis.

Calls to this function will be inlined if possible.


Syntax

(qforward q)

Description

Given a Quaternion q, returns the Vector3 derived by multiplying q by Vector3/forward.

Calls to this function will be inlined if possible.


Syntax

(aa ang x y z)

Description

Shortcut for angle-axis. (aa a x y z) is the same as (angle-axis a (v3 x y z)).

Calls to this function will be inlined if possible.


Syntax

(qlookat here there)
(qlookat here there up)

Description

Returns a Quaternion that faces there from here, both Vector3s. An additional up Vector3 can be provided to specify which direction is 'up'. up defaults to Vector3/up.


Syntax

(v2scale args*)

Description

Scales one or more Vector2s, as per Vector2/Scale.

If called with zero arguments, returns Vector2/one. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v3scale args*)

Description

Scales one or more Vector3s, as per Vector3/Scale.

If called with zero arguments, returns Vector3/one. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(v4scale args*)

Description

Scales one or more Vector4s, as per Vector4/Scale.

If called with zero arguments, returns Vector4/one. If called with one argument, that argument is returned, as with identity.

Calls to this function will be inlined if possible.


Syntax

(matrix4x4)
(matrix4x4 a)
(matrix4x4 r0 r1 r2 r3)
(matrix4x4 a b c d e f g h i j k l m n o p)

Description

Constructs a Matrix4x4


Syntax

(m*)
(m* a)
(m* a b)
(m* a b & args)

Description

Multiplies one or more Matrix4x4s.

If called with zero arguments, returns Matrix4x4/identity. If called with one argument, returns that argument.

Calls to this function will be inlined if possible.


Syntax

(determinant m)

Description

Wraps Matrix4x4/determinant


Syntax

(transpose m)

Description

Wraps Matrix4x4/transpose


Syntax

(column m col-inx)

Description

Wraps Matrix4x4/GetColumn


Syntax

(row m row-inx)

Description

Wraps Matrix4x4/GetRow


Syntax

(put-column m col-inx col)

Description

Sets column number col-inx of Matrix4x4 m to the Vector4 col


Syntax

(put-row m row-inx row)

Description

Sets row number row-inx of Matrix4x4 m to the Vector4 row


Syntax

(ortho left right bottom top znear zfar)

Description

Wraps Matrix4x4/Ortho


Syntax

(perspective fov aspect znear zfar)

Description

Wraps Matrix4x4/Perspective


Syntax

(inverse m)

Description

Wraps Matrix4x4/inverse


Syntax

(trs t r s)

Description

Wraps Matrix4x4/TRS


Clone this wiki locally