Skip to content

Commit 4f0e47e

Browse files
committed
Update math/rotate* input sockets
1 parent b8e8a5a commit 4f0e47e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

extensions/2.0/Khronos/KHR_interactivity/Specification.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,19 +1514,19 @@ Since this operation is a shortcut for the combination of multiplications and su
15141514
| Operation | `math/rotate2D` | 2D rotation
15151515
.2+| Input value sockets
15161516
| `float2 a` | Vector to rotate
1517-
| `float b` | Angle in radians
1517+
| `float angle` | Angle in radians
15181518
| Output value sockets
15191519
| `float2 value` | Rotated vector
15201520
|===
15211521

1522-
Let latexmath:[a_x] and latexmath:[a_y] be the components of the `a` input socket value.
1522+
Let latexmath:[a_x] and latexmath:[a_y] be the components of the `a` input socket value and latexmath:[\alpha] be the `angle` input socket value.
15231523

15241524
Then the components of the `value` output socket value are computed as follows:
15251525

15261526
[latexmath]
15271527
+++++
1528-
x = a_x \cdot \cos(b) - a_y \cdot \sin(b) \\
1529-
y = a_x \cdot \sin(b) + a_y \cdot \cos(b)
1528+
x = a_x \cdot \cos(\alpha) - a_y \cdot \sin(\alpha) \\
1529+
y = a_x \cdot \sin(\alpha) + a_y \cdot \cos(\alpha)
15301530
+++++
15311531

15321532
Since this operation is a shortcut for the combination of trigonometry and arithmetic operations, NaN and infinity values are propagated accordingly.
@@ -1538,7 +1538,7 @@ Since this operation is a shortcut for the combination of trigonometry and arith
15381538
| Operation | `math/rotate3D` | 3D rotation
15391539
.2+| Input value sockets
15401540
| `float3 a` | Vector to rotate
1541-
| `float4 b` | Rotation quaternion
1541+
| `float4 rotation` | Rotation quaternion
15421542
| Output value sockets
15431543
| `float3 value` | Rotated vector
15441544
|===
@@ -1551,14 +1551,14 @@ This node assumes that the rotation quaternion is unit.
15511551
Let
15521552

15531553
- latexmath:[\vec{a}] be a three-component vector formed from the `a` input socket value;
1554-
- latexmath:[b_x], latexmath:[b_y], latexmath:[b_z], and latexmath:[b_w] be the components of the `b` input socket value;
1555-
- latexmath:[\vec{b}] be a three-component vector formed from latexmath:[b_x], latexmath:[b_y], and latexmath:[b_z].
1554+
- latexmath:[r_x], latexmath:[r_y], latexmath:[r_z], and latexmath:[r_w] be the components of the `rotation` input socket value;
1555+
- latexmath:[\vec{r}] be a three-component vector formed from latexmath:[r_x], latexmath:[r_y], and latexmath:[r_z].
15561556

15571557
Then the components of the `value` output socket value are computed as the components of the following vector:
15581558

15591559
[latexmath]
15601560
+++++
1561-
\vec{a} + 2 \cdot (\vec{b} \times (\vec{b} \times \vec{a}) + b_w \cdot (\vec{b} \times \vec{a}))
1561+
\vec{a} + 2 \cdot (\vec{r} \times (\vec{r} \times \vec{a}) + r_w \cdot (\vec{r} \times \vec{a}))
15621562
+++++
15631563

15641564
Since this operation is a shortcut for the combination of arithmetic operations, NaN and infinity values are propagated accordingly.

0 commit comments

Comments
 (0)