general quaternion math, not limited to unit quaternions More...
Data Types | |
interface | abs |
interface | aimag |
interface | assignment(=) |
interface | conjg |
interface | dot_product |
interface | exp |
interface | log |
interface | quaternion |
interface | real |
Functions/Subroutines | |
subroutine, public | quaternions_init |
do self test More... | |
type(quaternion) pure function | init__ (array) |
construct a quaternion from a 4-vector More... | |
elemental pure subroutine | assign_quat__ (self, other) |
assign a quaternion More... | |
pure subroutine | assign_vec__ (self, other) |
assign a 4-vector More... | |
type(quaternion) elemental pure function | add__ (self, other) |
add a quaternion More... | |
type(quaternion) elemental pure function | pos__ (self) |
return (unary positive operator) More... | |
type(quaternion) elemental pure function | sub__ (self, other) |
subtract a quaternion More... | |
type(quaternion) elemental pure function | neg__ (self) |
negate (unary negative operator) More... | |
type(quaternion) elemental pure function | mul_quat__ (self, other) |
multiply with a quaternion More... | |
type(quaternion) elemental pure function | mul_scal__ (self, scal) |
multiply with a scalar More... | |
type(quaternion) elemental pure function | div_quat__ (self, other) |
divide by a quaternion More... | |
type(quaternion) elemental pure function | div_scal__ (self, scal) |
divide by a scalar More... | |
logical elemental pure function | eq__ (self, other) |
test equality More... | |
logical elemental pure function | neq__ (self, other) |
test inequality More... | |
type(quaternion) elemental pure function | pow_quat__ (self, expon) |
raise to the power of a quaternion More... | |
type(quaternion) elemental pure function | pow_scal__ (self, expon) |
raise to the power of a scalar More... | |
type(quaternion) elemental pure function | exp__ (a) |
take exponential More... | |
type(quaternion) elemental pure function | log__ (a) |
take logarithm More... | |
real(preal) elemental pure function | abs__ (self) |
return norm More... | |
real(preal) elemental pure function | dot_product__ (a, b) |
calculate dot product More... | |
type(quaternion) elemental pure function | conjg__ (self) |
take conjugate complex More... | |
type(quaternion) elemental pure function | homomorphed (self) |
homomorph More... | |
pure real(preal) function, dimension(4) | asarray (self) |
return as plain array More... | |
pure real(preal) function | real__ (self) |
real part (scalar) More... | |
pure real(preal) function, dimension(3) | aimag__ (self) |
imaginary part (3-vector) More... | |
type(quaternion) elemental pure function | inverse (self) |
inverse More... | |
subroutine | unittest |
check correctness of some quaternions functions More... | |
Variables | |
real(preal), parameter, public | p = -1.0_pReal |
parameter for orientation conversion. More... | |
general quaternion math, not limited to unit quaternions
w is the real part, (x, y, z) are the imaginary parts.
|
private |
return norm
Definition at line 366 of file quaternions.f90.
|
private |
add a quaternion
Definition at line 172 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
imaginary part (3-vector)
Definition at line 440 of file quaternions.f90.
|
private |
return as plain array
Definition at line 414 of file quaternions.f90.
|
private |
assign a quaternion
Definition at line 143 of file quaternions.f90.
|
private |
assign a 4-vector
Definition at line 156 of file quaternions.f90.
|
private |
take conjugate complex
Definition at line 390 of file quaternions.f90.
|
private |
divide by a quaternion
Definition at line 250 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
divide by a scalar
Definition at line 262 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
calculate dot product
Definition at line 378 of file quaternions.f90.
|
private |
test equality
Definition at line 275 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
take exponential
Definition at line 326 of file quaternions.f90.
|
private |
homomorph
Definition at line 402 of file quaternions.f90.
|
private |
construct a quaternion from a 4-vector
Definition at line 128 of file quaternions.f90.
|
private |
inverse
Definition at line 453 of file quaternions.f90.
Referenced by unittest().
|
private |
take logarithm
Definition at line 346 of file quaternions.f90.
|
private |
multiply with a quaternion
Definition at line 222 of file quaternions.f90.
References p.
Referenced by quaternions::quaternion::operator().
|
private |
multiply with a scalar
Definition at line 237 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
negate (unary negative operator)
Definition at line 210 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
test inequality
Definition at line 288 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
return (unary positive operator)
Definition at line 185 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
raise to the power of a quaternion
Definition at line 300 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
raise to the power of a scalar
Definition at line 313 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
subroutine, public quaternions::quaternions_init |
do self test
Definition at line 117 of file quaternions.f90.
References io::unittest().
Referenced by rotations::rotations_init().
|
private |
real part (scalar)
Definition at line 427 of file quaternions.f90.
|
private |
subtract a quaternion
Definition at line 197 of file quaternions.f90.
Referenced by quaternions::quaternion::operator().
|
private |
check correctness of some quaternions functions
Definition at line 465 of file quaternions.f90.
References inverse().
real(preal), parameter, public quaternions::p = -1.0_pReal |
parameter for orientation conversion.
Definition at line 19 of file quaternions.f90.
Referenced by rotations::ax2om(), rotations::ax2ro(), rotations::eu2ax(), rotations::eu2qu(), rotations::eu2ro(), mul_quat__(), rotations::om2ax(), rotations::qu2eu(), rotations::qu2om(), rotations::qu2ro(), and rotations::rottensor4().