File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
release-content/migration-guides Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : " Fix `From<Rot2>` implementation for `Mat2`"
3
+ pull_requests : [20522]
4
+ ---
5
+
6
+ Past releases had an incorrect ` From<Rot2> ` implementation for ` Mat2 ` , constructing a rotation matrix in the following form:
7
+
8
+ ``` text
9
+ [ cos, sin ]
10
+ [ -sin, cos ]
11
+ ```
12
+
13
+ This was actually the * inverse* of the rotation matrix, resulting in clockwise rotation when transforming vectors.
14
+ The correct version is the following:
15
+
16
+ ``` text
17
+ [ cos, -sin ]
18
+ [ sin, cos ]
19
+ ```
20
+
21
+ resulting in counterclockwise rotation.
22
+
23
+ This error has now been fixed. You may see that rotation matrices created using the ` From<Rot2> ` implementation
24
+ produce different results than before, as the rotation happens counterclockwise (as intended) rather than clockwise.
25
+ Invert either the input ` Rot2 ` or the resulting ` Mat2 ` to get the same results as before.
You can’t perform that action at this time.
0 commit comments