Skip to content

Commit

Permalink
TEST: PicoVector: Swap rotate translation order.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Apr 18, 2024
1 parent 4ff7a93 commit 21e9817
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/pico_vector/pico_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace pimoroni {

void PicoVector::rotate(pp_path_t *path, pp_point_t origin, float angle) {
pp_mat3_t t = pp_mat3_identity();
pp_mat3_translate(&t, -origin.x, -origin.y);
pp_mat3_rotate(&t, angle);
pp_mat3_translate(&t, origin.x, origin.y);
pp_mat3_rotate(&t, angle);
pp_mat3_translate(&t, -origin.x, -origin.y);
transform(path, &t);
}

Expand All @@ -37,9 +37,9 @@ namespace pimoroni {

void PicoVector::rotate(pp_poly_t *poly, pp_point_t origin, float angle) {
pp_mat3_t t = pp_mat3_identity();
pp_mat3_translate(&t, -origin.x, -origin.y);
pp_mat3_rotate(&t, angle);
pp_mat3_translate(&t, origin.x, origin.y);
pp_mat3_rotate(&t, angle);
pp_mat3_translate(&t, -origin.x, -origin.y);
transform(poly, &t);
}

Expand Down

0 comments on commit 21e9817

Please sign in to comment.