-
Notifications
You must be signed in to change notification settings - Fork 106
arcadia.linear
(v2)
(v2 x)
(v2 x y)
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.
(v3)
(v3 x)
(v3 x y z)
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.
(v4)
(v4 x)
(v4 x y z w)
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.
(qt)
(qt a b c d)
Constructs a Quaternion.
If called with zero arguments, returns Quaternion/identity.
(v2+ args*)
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.
(v3+ args*)
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.
(v4+ args*)
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.
(v2- args*)
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.
(v3- args*)
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.
(v4- args*)
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.
(v2* args*)
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.
(v3* args*)
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.
(v4* args*)
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.
(v2div args*)
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.
(v3div args*)
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.
(v4div args*)
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.
(qq* args*)
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.
(qv* args*)
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.
(q* args*)
Multiplies a Quaternion by one or more Vector3s or Quaternions.
Calls to this function will be inlined if possible.
(euler v)
Wraps Quaternion/Euler.
Calls to this function will be inlined if possible.
(euler-angles q)
Wraps the Quaternion/eulerAngles.
Calls to this function will be inlined if possible.
(to-angle-axis q)
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.
(angle-axis angle axis)
Given an angle (float) and an axis (Vector3), constructs a Quarternion, as per Quaternion/AngleAxis.
Calls to this function will be inlined if possible.
(qforward q)
Given a Quaternion q, returns the Vector3 derived by multiplying q by Vector3/forward.
Calls to this function will be inlined if possible.
(aa ang x y z)
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.
(qlookat here there)
(qlookat here there up)
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.
(v2scale args*)
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.
(v3scale args*)
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.
(v4scale args*)
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.
(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)
Constructs a Matrix4x4
(m*)
(m* a)
(m* a b)
(m* a b & args)
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.
(determinant m)
Wraps Matrix4x4/determinant
(transpose m)
Wraps Matrix4x4/transpose
(column m col-inx)
Wraps Matrix4x4/GetColumn
(row m row-inx)
Wraps Matrix4x4/GetRow
(put-column m col-inx col)
Sets column number col-inx of Matrix4x4 m to the Vector4 col
(put-row m row-inx row)
Sets row number row-inx of Matrix4x4 m to the Vector4 row
(ortho left right bottom top znear zfar)
Wraps Matrix4x4/Ortho
(perspective fov aspect znear zfar)
Wraps Matrix4x4/Perspective
(inverse m)
Wraps Matrix4x4/inverse
(trs t r s)
Wraps Matrix4x4/TRS