Liking cljdoc? Tell your friends :D

fastmath.quaternion


-Iclj

source

-Jclj

source

-Kclj

source

acosclj

(acos q)
source

acoshclj

(acosh q)
source

acotclj

(acot q)
source

acothclj

(acoth q)
source

acscclj

(acsc q)
source

acschclj

(acsch q)
source

addclj

(add q1 q2)

Sum of two quaternions

Sum of two quaternions
sourceraw docstring

argclj

(arg quaternion)

Argument of quaternion, atan2(|vector(q)|, re(q))

Argument of quaternion, atan2(|vector(q)|, re(q))
sourceraw docstring

asecclj

(asec q)
source

asechclj

(asech q)
source

asinclj

(asin q)
source

asinhclj

(asinh q)
source

atanclj

(atan q)
source

atanhclj

(atanh q)
source

complex->quaternionclj

(complex->quaternion z)

Create quaternion from complex number

Create quaternion from complex number
sourceraw docstring

conjugateclj

(conjugate quaternion)

Returns conjugate of quaternion

Returns conjugate of quaternion
sourceraw docstring

cosclj

(cos q)
source

coshclj

(cosh q)
source

cotclj

(cot q)
source

cothclj

(coth q)
source

cscclj

(csc q)
source

cschclj

(csch q)
source

delta-eqclj

(delta-eq q1 q2)
(delta-eq q1 q2 accuracy)

Compare quaternions with given accuracy (10e-6 by default)

Compare quaternions with given accuracy (10e-6 by default)
sourceraw docstring

divclj

(div q1 q2)

Divide two quaternions

Divide two quaternions
sourceraw docstring

expclj

(exp q)
source

from-anglesclj

(from-angles [x y z])
(from-angles x y z)

Convert Tait–Bryan angles z-y′-x" to quaternion.

Convert Tait–Bryan angles z-y′-x" to quaternion.
sourceraw docstring

from-eulerclj

(from-euler [roll pitch yaw])
(from-euler roll pitch yaw)

Convert Euler ZYX (body 3-2-1) representation to quaternion

Input should be 3d vector contating roll (x), pitch (y) and yaw (z) angles, or individual values.

  • roll and yaw should be from [-pi, pi] range
  • pitch should be from [-pi/2, pi/2] range
Convert Euler ZYX (body 3-2-1) representation to quaternion

Input should be 3d vector contating roll (x), pitch (y) and yaw (z) angles, or individual values.

* roll and yaw should be from `[-pi, pi]` range
* pitch should be from `[-pi/2, pi/2]` range
sourceraw docstring

from-rotation-matrixclj

(from-rotation-matrix m)

Convert rotation 3x3 matrix to a quaternion

Convert rotation 3x3 matrix to a quaternion
sourceraw docstring

Iclj

source

im-iclj

(im-i quaternion)

Return i imaginary part

Return i imaginary part
sourceraw docstring

im-jclj

(im-j quaternion)

Return j imaginary part

Return j imaginary part
sourceraw docstring

im-kclj

(im-k quaternion)

Return k imaginary part

Return k imaginary part
sourceraw docstring

imaginary?clj

(imaginary? quaternion)

Is q is a pure imaginary number?

Is q is a pure imaginary number?
sourceraw docstring

inf?clj

(inf? quaternion)

Is infinitive?

Is infinitive?
sourceraw docstring

Jclj

source

Kclj

source

logclj

(log q)
source

logbclj

(logb quaternion b)

log with base b

log with base b
sourceraw docstring

multclj

(mult q1 q2)

Multiply two quaternions.

Multiply two quaternions.
sourceraw docstring

nan?clj

(nan? quaternion)

Is NaN?

Is NaN?
sourceraw docstring

negclj

(neg quaternion)

Negation of quaternion.

Negation of quaternion.
sourceraw docstring

normclj

(norm quaternion)

Norm of the quaternion, length of the vector

Norm of the quaternion, length of the vector
sourceraw docstring

normalizeclj

(normalize quaternion)

Normalize quaternion

Normalize quaternion
sourceraw docstring

ONEclj

source

powclj

(pow q p)

Quaternion power

Quaternion power
sourceraw docstring

qsgnclj

(qsgn q)
(qsgn re im-i im-j im-k)

sgn of the quaternion.

Returns 0 for 0+0i+0j+0k or calls m/sgn on real part otherwise.

sgn of the quaternion.

Returns `0` for `0+0i+0j+0k` or calls `m/sgn` on real part otherwise.
sourceraw docstring

quaternionclj

(quaternion a)
(quaternion scalar [i j k])
(quaternion a b c d)

Create quaternion from individual values or scalar and vector parts, reprezented as Vec4.

Create quaternion from individual values or scalar and vector parts, reprezented as `Vec4`.
sourceraw docstring

reclj

(re quaternion)

Returns scalar part of quaternion

Returns scalar part of quaternion
sourceraw docstring

real?clj

(real? quaternion)

Is q is a real number?

Is q is a real number?
sourceraw docstring

reciprocalclj

(reciprocal quaternion)
source

rotateclj

(rotate in rotq)
(rotate in angle u)

Rotate 3d in vector around axis u, the same as fastmath.vector/axis-rotate.

Rotate 3d `in` vector around axis `u`, the same as `fastmath.vector/axis-rotate`.
sourceraw docstring

rotation-quaternionclj

(rotation-quaternion angle u)

Create rotation quaternion around vector u and angle alpha

Create rotation quaternion around vector u and angle alpha
sourceraw docstring

scalarclj

(scalar quaternion)

Returns scalar part of quaternion, double

Returns scalar part of quaternion, double
sourceraw docstring

scaleclj

(scale quaternion scale)

Scale the quaternion

Scale the quaternion
sourceraw docstring

secclj

(sec q)
source

sechclj

(sech q)
source

sinclj

(sin q)
source

sinhclj

(sinh q)
source

slerpclj

(slerp q1 q2 t)

Interpolate quaternions

Interpolate quaternions
sourceraw docstring

sqclj

(sq quaternion)

Square of quaternion.

Square of quaternion.
sourceraw docstring

sqrtclj

(sqrt q)
source

subclj

(sub q1 q2)

Difference of two quaternions

Difference of two quaternions
sourceraw docstring

tanclj

(tan q)
source

tanhclj

(tanh q)
source

to-anglesclj

(to-angles q)

Convert quaternion to Tait–Bryan angles, z-y′-x".

Convert quaternion to Tait–Bryan angles, z-y′-x".
sourceraw docstring

to-eulerclj

(to-euler q)

Convert quaternion to Euler ZYX (body 3-2-1). Quaternion will be normalized before calculations.

Output will contain roll (x), pitch (y) and yaw (z) angles.

Convert quaternion to Euler ZYX (body 3-2-1). Quaternion will be normalized before calculations.

Output will contain roll (x), pitch (y) and yaw (z) angles.
sourceraw docstring

to-rotation-matrixclj

(to-rotation-matrix q)

Convert quaternion to rotation 3x3 matrix

Convert quaternion to rotation 3x3 matrix
sourceraw docstring

vectorclj

(vector quaternion)

Returns vector part of quaternion, Vec3 type

Returns vector part of quaternion, `Vec3` type
sourceraw docstring

ZEROclj

source

zero?clj

(zero? quaternion)

Is zero?

Is zero?
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close