File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## [ 1.15.2] - 2025-06-24
4+ - fixed a corner case in ` compute_2d_rotation_matrix ` leading to wrong coordinate transformation in 1D slice plots
5+
36## [ 1.15.1] - 2025-06-22
47- Allow for Makie 0.24 and Triangulate 3.0
58
Original file line number Diff line number Diff line change @@ -173,6 +173,11 @@ function compute_2d_rotation_matrix(target_vector)
173173 # solve non-linear system for α
174174 α = asin (t[1 ])
175175
176+ # check second condition and rotate in the other direction if necessary
177+ if ! (cos (α) ≈ t[2 ])
178+ α = π - α
179+ end
180+
176181 return R (α)
177182end
178183
Original file line number Diff line number Diff line change 7979 t = [0 , 1 ]
8080 @test GridVisualize. compute_2d_rotation_matrix (t) ≈ I
8181
82- # random test
83- t = [0.3543579344795591 , 0.21250427156069385 ]
84- R = GridVisualize. compute_2d_rotation_matrix (t)
85-
86- # test rotation property
87- @test R' t ≈ [0 , 1 ]
82+ # random tests
83+ for t in [
84+ [0.3543579344795591 , 0.21250427156069385 ],
85+ [1.0 , 1.0 ],
86+ [1.0 , - 1.0 ],
87+ [- 1.0 , 1.0 ],
88+ [- 1.0 , - 1.0 ],
89+ ]
90+ R = GridVisualize. compute_2d_rotation_matrix (t)
91+ # test rotation property
92+ @test R' t ≈ [0 , 1 ]
93+ end
8894end
8995
9096
You can’t perform that action at this time.
0 commit comments