Skip to content

Commit 11d4bbf

Browse files
committed
📚 Update EulerAngleAxis documentation
1 parent 4ed1fd0 commit 11d4bbf

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/src/man/euler_angle_axis.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,51 @@
11
Euler Angle and Axis
22
====================
33

4+
```@meta
5+
CurrentModule = ReferenceFrameRotations
6+
DocTestSetup = quote
7+
using ReferenceFrameRotations
8+
end
9+
```
10+
411
The Euler angle and axis representation is defined by the following immutable
512
structure:
613

714
```julia
815
struct EulerAngleAxis{T}
916
a::T
10-
v::Vector{T}
17+
v::SVector{3,T}
1118
end
1219
```
1320

1421
in which `a` is the Euler Angle and `v` is a unitary vector aligned with the
1522
Euler axis.
1623

24+
The constructor for this structure is:
25+
26+
```julia
27+
function EulerAngleAxis(a::T1, v::AbstractVector{T2}) where {T1,T2}
28+
```
29+
30+
in which a `EulerAngleAxis` with angle `a [rad]` and vector `v` will be created.
31+
Notice that the type of the returned structure will be selected according to the
32+
input types `T1` and `T2`. Furthermore, the vector `v` **will not** be
33+
normalized.
34+
35+
```jldoctest
36+
julia> EulerAngleAxis(1,[1,1,1])
37+
EulerAngleAxis{Int64}(1, [1, 1, 1])
38+
39+
julia> EulerAngleAxis(1.f0,[1,1,1])
40+
EulerAngleAxis{Float32}(1.0f0, Float32[1.0, 1.0, 1.0])
41+
42+
julia> EulerAngleAxis(1,[1,1,1.f0])
43+
EulerAngleAxis{Float32}(1.0f0, Float32[1.0, 1.0, 1.0])
44+
45+
julia> EulerAngleAxis(1.0,[1,1,1])
46+
EulerAngleAxis{Float64}(1.0, [1.0, 1.0, 1.0])
47+
```
48+
1749
!!! note
1850

1951
The support of this representation is still incomplete. Only the conversion

0 commit comments

Comments
 (0)