Return the scalar part of the quaternion
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(quat_t), | intent(in) | :: | q | The quaternion of interest |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
elemental function scaler(q) result(o)
!! Return the scalar part of the quaternion
type(quat_t),intent(in)::q
!! The quaternion of interest
real(wp)::o
o = q%s
end function scaler