Skip to content

Rename Vec2::angle_between to Vec2::angle_to#524

Merged
bitshifter merged 2 commits intomainfrom
angle_towards
Jun 8, 2024
Merged

Rename Vec2::angle_between to Vec2::angle_to#524
bitshifter merged 2 commits intomainfrom
angle_towards

Conversation

@bitshifter
Copy link
Copy Markdown
Owner

This method has a different meaning to Vec3::angle_between, which was inconsistent and confusing.

This method has a different meaning to Vec3::angle_between, which was
inconsistent and confusing.
@bitshifter bitshifter marked this pull request as ready for review June 8, 2024 04:18
@bitshifter bitshifter changed the title Rename Vec2::angle_between to Vec2::angle_towards Rename Vec2::angle_between to Vec2::angle_to Jun 8, 2024
@bitshifter bitshifter merged commit 9f812df into main Jun 8, 2024
@bitshifter bitshifter deleted the angle_towards branch June 8, 2024 04:34
github-merge-queue Bot pushed a commit to bevyengine/bevy that referenced this pull request Nov 10, 2024
# Objective

`glam` has opted to rename `Vec2::angle_between` to `Vec2::angle_to`
because of the difference in semantics compared to `Vec3::angle_between`
and others which return an unsigned angle `[0, PI]` where
`Vec2::angle_between` returns a signed angle `[-PI, PI]`.
We should follow suit for `Rot2` in 0.15 to avoid further confusion.

Links:
-
bitshifter/glam-rs#514 (comment)
- bitshifter/glam-rs#524

## Migration Guide

`Rot2::angle_between` has been deprecated, use `Rot2::angle_to` instead,
the semantics of `Rot2::angle_between` will change in the future.

---------

Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
mockersf pushed a commit to bevyengine/bevy that referenced this pull request Nov 11, 2024
# Objective

`glam` has opted to rename `Vec2::angle_between` to `Vec2::angle_to`
because of the difference in semantics compared to `Vec3::angle_between`
and others which return an unsigned angle `[0, PI]` where
`Vec2::angle_between` returns a signed angle `[-PI, PI]`.
We should follow suit for `Rot2` in 0.15 to avoid further confusion.

Links:
-
bitshifter/glam-rs#514 (comment)
- bitshifter/glam-rs#524

## Migration Guide

`Rot2::angle_between` has been deprecated, use `Rot2::angle_to` instead,
the semantics of `Rot2::angle_between` will change in the future.

---------

Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Dec 2, 2024
# Objective

`glam` has opted to rename `Vec2::angle_between` to `Vec2::angle_to`
because of the difference in semantics compared to `Vec3::angle_between`
and others which return an unsigned angle `[0, PI]` where
`Vec2::angle_between` returns a signed angle `[-PI, PI]`.
We should follow suit for `Rot2` in 0.15 to avoid further confusion.

Links:
-
bitshifter/glam-rs#514 (comment)
- bitshifter/glam-rs#524

## Migration Guide

`Rot2::angle_between` has been deprecated, use `Rot2::angle_to` instead,
the semantics of `Rot2::angle_between` will change in the future.

---------

Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
ecoskey pushed a commit to ecoskey/bevy that referenced this pull request Jan 6, 2025
# Objective

`glam` has opted to rename `Vec2::angle_between` to `Vec2::angle_to`
because of the difference in semantics compared to `Vec3::angle_between`
and others which return an unsigned angle `[0, PI]` where
`Vec2::angle_between` returns a signed angle `[-PI, PI]`.
We should follow suit for `Rot2` in 0.15 to avoid further confusion.

Links:
-
bitshifter/glam-rs#514 (comment)
- bitshifter/glam-rs#524

## Migration Guide

`Rot2::angle_between` has been deprecated, use `Rot2::angle_to` instead,
the semantics of `Rot2::angle_between` will change in the future.

---------

Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant