Skip to content

Commit 3f41acb

Browse files
markuswntrstephentyrone
authored andcommitted
Add transformation documentation
1 parent d5f890e commit 3f41acb

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Transformation
22

3-
`Rotation.swift` encapsulates an API for working with other forms of rotation representations, such as *Angle/Axis*, *Polar* or *Rotation Vector*. The API provides conversion from these representations to `Quaternion` and vice versa. Additionally, the API provides a method to directly rotate an arbitrary vector by a quaternion and thus avoids the calculation of an intermediate representation to any other form in the process.
3+
`Transformation.swift` encapsulates an API for working with other representations of transformations, such as *Angle-Axis*, *Polar* and *Rotation Vector*. The API provides operations to convert from these representations to `Quaternion` and vice versa.
4+
Additionally, the API provides a method to directly rotate an arbitrary vector by a quaternion and thus avoids the calculation of an intermediate representation to any other form in the process.
45

56
## Policies
6-
- zero and non-finite quaternions have an indeterminate angle and axis. Thus,
7-
the `angle` property of `.zero` or `.infinity` is `RealType.nan`, and the
8-
`axis` property of `.zero` or `.infinity` is `.nan` in all lanes.
9-
- Quaternions with `angle == .zero` have an indeterminate axis. Thus, the
10-
`axis` property is `.nan` in all lanes.
7+
8+
- zero and non-finite quaternions have indeterminate transformation properties and can not be converted to another representation. Thus,
9+
10+
- The `angle` property of `.zero` or `.infinity` is `RealType.nan`.
11+
- The `axis` property of `.zero` or `.infinity` is `RealType.nan` in all lanes.
12+
- The `rotationVector` property of `.zero` or `.infinity` is `RealType.nan` in all lanes.
13+
14+
- Quaternions with `angle == .zero` have an indeterminate axis. Thus,
15+
16+
- the `axis` property of `angle == .zero` is `RealType.nan` in all lanes.
17+
- the `rotationVector` property of `angle == .zero` is `RealType.nan` in all lanes.
18+

0 commit comments

Comments
 (0)