mirror of
https://github.com/bevyengine/bevy
synced 2024-11-24 21:53:07 +00:00
01dce4742f
# Objective Unlike `Capsule3d` which has the `.to_cylinder` method, `Capsule2d` doesn't have an equivalent `.to_inner_rectangle` method and as shown by #15191 this is surprisingly easy to get wrong ## Solution Implemented a `Capsule2d::to_inner_rectangle` method as it is implemented in the fixed `Capsule2d` shape sampling, and as I was adding tests I noticed `Capsule2d` didn't implement `Measure2d` so I did this as well. ## Changelog ### Added - `Capsule2d::to_inner_rectangle`, `Capsule2d::area` and `Capsule2d::perimeter` --------- Co-authored-by: Joona Aalto <jondolf.dev@gmail.com> Co-authored-by: James Liu <contact@jamessliu.com> Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
clippy.toml | ||
README.md |